pub trait AsFd {
fn as_fd(&self) -> BorrowedFd<'_>;
}
This is supported on WASI 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
This is supported on Unix only.
impl AsFd for ChildStdin
This is supported on Unix only.
impl AsFd for ChildStdout
This is supported on Unix only.
impl AsFd for PidFd
This is supported on Linux only.
impl AsFd for BorrowedFd<'_>
impl AsFd for OwnedFd
impl AsFd for UnixDatagram
This is supported on Unix only.
impl AsFd for UnixListener
This is supported on Unix only.
impl AsFd for UnixStream
This is supported on Unix only.