[][src]Struct suspend::Listener

pub struct Listener<'a> { /* fields omitted */ }

The result of acquiring a Suspend using either Suspend::listen or Suspend::try_listen. It may be used to wait for a notification with .await or by parking the current thread.

Implementations

impl<'_> Listener<'_>[src]

pub fn wait(&mut self)[src]

Wait for a notification on the associated Suspend instance, parking the current thread until that time.

pub fn wait_deadline(&mut self, expire: Instant) -> bool[src]

Wait for a notification on the associated Suspend instance, parking the current thread until the result is available or the deadline is reached. If a timeout occurs then false is returned, otherwise true.

pub fn wait_timeout(&self, timeout: Duration) -> bool[src]

Wait for a notification on the associated Suspend instance, parking the current thread until the result is available or the timeout expires. If a timeout does occur then false is returned, otherwise true.

Trait Implementations

impl<'_> Drop for Listener<'_>[src]

impl<'a> Future for Listener<'a>[src]

type Output = ()

The type of value produced on completion.

Auto Trait Implementations

impl<'a> !RefUnwindSafe for Listener<'a>

impl<'a> Send for Listener<'a>

impl<'a> Sync for Listener<'a>

impl<'a> Unpin for Listener<'a>

impl<'a> !UnwindSafe for Listener<'a>

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, U> Into<U> for T where
    U: From<T>, 
[src]

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<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.