pub struct AsyncFdReadyMutGuard<'a, T: AsFd> { /* private fields */ }Expand description
As AsyncFdReadyGuard, with the descriptor borrowed mutably.
Implementations§
Source§impl<T: AsFd> AsyncFdReadyMutGuard<'_, T>
impl<T: AsFd> AsyncFdReadyMutGuard<'_, T>
Sourcepub fn clear_ready(&mut self)
pub fn clear_ready(&mut self)
The descriptor would block: the next wait lasts until the driver says it may be ready again.
Sourcepub fn clear_ready_matching(&mut self, ready: Ready)
pub fn clear_ready_matching(&mut self, ready: Ready)
Clears what of ready this guard holds.
Sourcepub fn retain_ready(&mut self)
pub fn retain_ready(&mut self)
Keeps the readiness: the next wait may answer at once.
Source§impl<T: AsFd> AsyncFdReadyMutGuard<'_, T>
impl<T: AsFd> AsyncFdReadyMutGuard<'_, T>
Sourcepub fn try_io<R>(
&mut self,
f: impl FnOnce(&mut AsyncFd<T>) -> Result<R>,
) -> Result<Result<R>, TryIoError>
pub fn try_io<R>( &mut self, f: impl FnOnce(&mut AsyncFd<T>) -> Result<R>, ) -> Result<Result<R>, TryIoError>
Runs f; if it answers WouldBlock, the readiness is cleared and
Err(TryIoError) comes back, else Ok with what it answered.
§Errors
TryIoError when f would block.
Sourcepub fn get_inner_mut(&mut self) -> &mut T
pub fn get_inner_mut(&mut self) -> &mut T
The descriptor, mutably.
Trait Implementations§
Auto Trait Implementations§
impl<'a, T> !RefUnwindSafe for AsyncFdReadyMutGuard<'a, T>
impl<'a, T> !UnwindSafe for AsyncFdReadyMutGuard<'a, T>
impl<'a, T> Freeze for AsyncFdReadyMutGuard<'a, T>
impl<'a, T> Send for AsyncFdReadyMutGuard<'a, T>where
T: Send,
impl<'a, T> Sync for AsyncFdReadyMutGuard<'a, T>where
T: Sync,
impl<'a, T> Unpin for AsyncFdReadyMutGuard<'a, T>
impl<'a, T> UnsafeUnpin for AsyncFdReadyMutGuard<'a, T>
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