Struct std::os::wasi::io::OwnedFd [−][src]
#[repr(transparent)]pub struct OwnedFd { /* fields omitted */ }
This is supported on WASI only.
Expand description
An owned file descriptor.
This closes the file descriptor on drop.
This uses repr(transparent)
and has the representation of a host file
descriptor, so it can be used in FFI in places where a file descriptor is
passed as a consumed argument or returned as an owned value, and it never
has the value -1
.
Trait Implementations
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
This is supported on Unix only.
This is supported on Unix only.
Constructs a new instance of Self
from the given raw file descriptor.
Safety
The resource pointed to by fd
must be open and suitable for assuming
ownership. The resource must not require any cleanup other than close
.