pub trait FromFileDesc {
// Required method
unsafe fn from_file_desc(fd: FileDesc) -> Self;
}
Expand description
Trait to turn a UnixFileDesc into another object (like File).
Required Methods§
Sourceunsafe fn from_file_desc(fd: FileDesc) -> Self
unsafe fn from_file_desc(fd: FileDesc) -> Self
Constructs a new instance of Self from the given UnixFileDesc.
§Safety
The fd passed in must be a valid and open file descriptor.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.