pub trait FromRawFd {
    // Required method
    unsafe fn from_raw_fd(fd: RawFd) -> Self;
}
Expand description

Contruct IO objects from raw fds.

Required Methods§

source

unsafe fn from_raw_fd(fd: RawFd) -> Self

Constructs a new IO object from the specified raw fd.

Safety

The fd passed in must:

  • be a valid open handle or socket,
  • be opened with FILE_FLAG_OVERLAPPED if it’s a file handle,
  • have not been attached to a driver.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl FromRawFd for File

source§

unsafe fn from_raw_fd(fd: RawFd) -> Self

source§

impl FromRawFd for Socket

source§

unsafe fn from_raw_fd(fd: RawFd) -> Self

Implementors§