Struct kernel::file::FileDescriptorReservation
source · [−]pub struct FileDescriptorReservation { /* private fields */ }
Expand description
A file descriptor reservation.
This allows the creation of a file descriptor in two steps: first, we reserve a slot for it, then we commit or drop the reservation. The first step may fail (e.g., the current process ran out of available slots), but commit and drop never fail (and are mutually exclusive).
Implementations
sourceimpl FileDescriptorReservation
impl FileDescriptorReservation
sourcepub fn reserved_fd(&self) -> u32
pub fn reserved_fd(&self) -> u32
Returns the file descriptor number that was reserved.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for FileDescriptorReservation
impl Send for FileDescriptorReservation
impl Sync for FileDescriptorReservation
impl Unpin for FileDescriptorReservation
impl UnwindSafe for FileDescriptorReservation
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more