std::os::unix::io
이 페이지의 내용
- Traits
AsRawFd1FromRawFd1IntoRawFd1- Type aliases
API 참조는 영어로만 있습니다. 표준 라이브러리 소스의 영어 문서 주석에서 만듭니다.
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.