pub struct Guard { /* private fields */ }Expand description
A type that restores a replaced file descriptor when it’s dropped
Implementations§
Source§impl Guard
impl Guard
Sourcepub fn into_inner(self) -> OwnedFd
pub fn into_inner(self) -> OwnedFd
Consume the guard returning an OwnedFd with the original file descriptor
Sourcepub fn borrow_inner(&self) -> BorrowedFd<'_>
pub fn borrow_inner(&self) -> BorrowedFd<'_>
Obtain a BorrowFd to the original file descriptor
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Guard
impl RefUnwindSafe for Guard
impl Send for Guard
impl Sync for Guard
impl Unpin for Guard
impl UnwindSafe for Guard
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more