#[repr(transparent)]
pub struct OwnedFd { /* private fields */ }
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
.
Formats the value using the given formatter. Read more
Executes the destructor for this type. Read more
Constructs a new instance of Self
from the given file descriptor. Read more
Constructs a new instance of Self
from the given file descriptor
converted from into_owned
. Read more
Constructs a new instance of Self
from the given raw file descriptor.
The resource pointed to by raw
must be open and suitable for assuming
ownership.
Consumes this object, returning the underlying file descriptor. Read more
Consumes this object, returning the raw underlying file descriptor. Read more
impl<T> Any for T where
T: 'static + ?Sized,
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Constructs Self
from the raw value. Read more
Constructs Self
from the raw value. Read more
impl<T, U> Into<U> for T where
U: From<T>,
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.