Skip to main content

AsyncFdReadyMutGuard

Struct AsyncFdReadyMutGuard 

Source
pub struct AsyncFdReadyMutGuard<'a, T: AsFd> { /* private fields */ }
Expand description

As AsyncFdReadyGuard, with the descriptor borrowed mutably.

Implementations§

Source§

impl<T: AsFd> AsyncFdReadyMutGuard<'_, T>

Source

pub fn ready(&self) -> Ready

What may be ready.

Source

pub fn clear_ready(&mut self)

The descriptor would block: the next wait lasts until the driver says it may be ready again.

Source

pub fn clear_ready_matching(&mut self, ready: Ready)

Clears what of ready this guard holds.

Source

pub fn retain_ready(&mut self)

Keeps the readiness: the next wait may answer at once.

Source

pub fn get_inner(&self) -> &T

The descriptor.

Source§

impl<T: AsFd> AsyncFdReadyMutGuard<'_, T>

Source

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.

Source

pub fn get_ref(&self) -> &AsyncFd<T>

The descriptor’s AsyncFd.

Source

pub fn get_mut(&mut self) -> &mut AsyncFd<T>

The descriptor’s AsyncFd, mutably.

Source

pub fn get_inner_mut(&mut self) -> &mut T

The descriptor, mutably.

Trait Implementations§

Source§

impl<T: AsFd> Debug for AsyncFdReadyMutGuard<'_, T>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> MaybeSend for T
where T: Send + ?Sized,

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.