Objects that are file descriptor wrappers.
trait FDContainer {
/* Required methods */
fn borrow(&self) -> i32
fn from_borrowed(fd: i32) -> Self
fn from_owned(fd: i32) -> Self
fn is_owned(&self) -> bool
fn unwrap(self) -> i32
/* Provided methods */
fn as_fdio(&self) -> FdIo
fn description_flags(&self) -> Result<DescriptionFlags, Errno>
fn duplicate(&self) -> Result<Self, Errno>
fn duplicate_as(&self, new: i32) -> Result<Self, Errno>
fn duplicate_min(&self, min: i32) -> Result<Self, Errno>
fn is_close_on_exec(&self) -> Result<bool, Errno>
fn set_close_on_exec(&self, val: bool) -> Result<(), Errno>
fn set_description_flags(&self, flags: DescriptionFlags) -> Result<(), Errno>
}| Receiver | Name | Description |
|---|---|---|
&self | as_fdio | Borrows the file descriptor as an |
&self | borrow | Returns the contained file descriptor. |
&self | description_flags | Retrieves the file description flags. |
&self | duplicate | Duplicates the file descriptor. |
&self | duplicate_as | Duplicates the file descriptor, replacing an existing one. |
&self | duplicate_min | Duplicates the file descriptor so that the duplicated one has a minimum value. |
| from_borrowed | Creates a new borrowed object from a file descriptor. |
| from_owned | Creates a new owned object from a file descriptor. |
&self | is_close_on_exec | Retrieves the status of the |
&self | is_owned | Returns whether the object owns the file descriptor, i.e., whether it closes it when it goes out of scope. |
&self | set_close_on_exec | Enables or disables the |
&self | set_description_flags | Sets the file description flags. |
self | unwrap | Consumes the object and returns the file descriptor without closing it. |