std::os::unix::io
On this page
- Traits
AsRawFd1FromRawFd1IntoRawFd1- Type aliases
raw file descriptors. File,
the sockets, the child pipes and the standard streams implement
AsRawFd; FromRawFd takes ownership of a descriptor and
IntoRawFd gives it up.
Traits
AsRawFdSource
pub trait AsRawFdThe descriptor behind a handle, still owned by it (-1 once the
handle is closed).
The file descriptor, still owned by
self.
FromRawFdSource
pub trait FromRawFdA handle that owns descriptor fd from now on: closing the handle
closes fd.
Safety:
fdmust be open, and nothing else may close it.
IntoRawFdSource
pub trait IntoRawFdA handle that gives up its descriptor: the handle is consumed and nothing closes the fd; the caller owns it.
The file descriptor, now the caller's to close (
-1ifselfwas closed).
Type aliases
RawFdSource
pub type RawFd = i32A file descriptor.