[−][src]Trait std::os::fortanix_sgx::io::TryIntoRawFd
A trait to express the ability to consume an object and acquire ownership of its raw file descriptor.
Required methods
fn try_into_raw_fd(self) -> Result<RawFd, Self>
Consumes this object, returning the raw underlying file descriptor, if this object is not cloned.
This function transfers ownership of the underlying file descriptor to the caller. Callers are then the unique owners of the file descriptor and must close the descriptor once it's no longer needed.
Unlike other platforms, on SGX, the file descriptor is shared between
all clones of an object. To avoid race conditions, this function will
only return Ok
when called on the final clone.