pub trait AsFd {
fn as_fd(&self) -> BorrowedFd<'_>;
}
This is supported 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
This is supported on Linux only.