[][src]Struct async_flag::Waiter

pub struct Waiter { /* fields omitted */ }

A cloneable waiter implementing Future with an Output type of Result<(), SetterDropped> that will become ready when the associated Setter is set or dropped.

Implementations

impl Waiter[src]

pub fn is_set(&self) -> bool[src]

Check if the flag is currently set. This only returns the current value, and if it's not set there's no guarantees for how long it will stay unset, it may even be set by the time the function returns.

pub fn is_dropped(&self) -> bool[src]

Check if the flag was dropped. This only returns the current value, and if it's not set there's no guarantees for how long it will stay unset, it may even be set by the time the function returns.

pub fn is_finished(&self) -> bool[src]

Check if the flag was set to some value, either by being set or by being dropped. This only returns the current value, and if it's not set there's no guarantees for how long it will stay unset, it may even be set by the time the function returns.

Trait Implementations

impl Clone for Waiter[src]

impl Future for Waiter[src]

type Output = Result<(), SetterDropped>

The type of value produced on completion.

impl PinnedDrop for Waiter[src]

impl<'pin> Unpin for Waiter where
    __Waiter<'pin>: Unpin
[src]

impl UnsafeUnpin for Waiter[src]

Auto Trait Implementations

impl !RefUnwindSafe for Waiter

impl Send for Waiter

impl !Sync for Waiter

impl !UnwindSafe for Waiter

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> FutureExt for T where
    T: Future + ?Sized
[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<F, T, E> TryFuture for F where
    F: Future<Output = Result<T, E>> + ?Sized
[src]

type Ok = T

The type of successful values yielded by this future

type Error = E

The type of failures yielded by this future

impl<Fut> TryFutureExt for Fut where
    Fut: TryFuture + ?Sized
[src]

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.