pub trait AsFd {
fn as_fd(&self) -> BorrowedFd<'_>;
}
Available on Unix only.
Expand description
A trait to borrow the file descriptor from an underlying object.
This is only available on unix platforms and must be imported in order to
call the method. Windows platforms have a corresponding AsHandle
and
AsSocket
set of traits.
Required Methods
Implementors
impl AsFd for File
impl AsFd for Stderr
impl AsFd for Stdin
impl AsFd for Stdout
impl AsFd for TcpListener
impl AsFd for TcpStream
impl AsFd for UdpSocket
impl AsFd for ChildStderr
impl AsFd for ChildStdin
impl AsFd for ChildStdout
impl AsFd for PidFd
Available on Linux only.