docs

std::os::unix::io

이 페이지의 내용

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 AsRawFd

The descriptor behind a handle, still owned by it (-1 once the handle is closed).

  • fn as_raw_fd(self) -> RawFd§

    Source

    The file descriptor, still owned by self.

FromRawFdSource

pub trait FromRawFd

A handle that owns descriptor fd from now on: closing the handle closes fd.

  • unsafe fn from_raw_fd(fd: RawFd) -> Self§

    Source

    Safety: fd must be open, and nothing else may close it.

IntoRawFdSource

pub trait IntoRawFd

A handle that gives up its descriptor: the handle is consumed and nothing closes the fd; the caller owns it.

  • fn into_raw_fd(self) -> RawFd§

    Source

    The file descriptor, now the caller's to close (-1 if self was closed).

Type aliases

RawFdSource

pub type RawFd = i32

A file descriptor.