[][src]Struct triggered::Listener

pub struct Listener { /* fields omitted */ }

A struct used to wait for a trigger event from a Trigger.

Can be waited on synchronously via Listener::wait or asynchronously thanks to the struct implementing Future.

The listener can be cloned and any amount of threads and tasks can wait for the same trigger at the same time.

Methods

impl Listener[src]

pub fn wait(&self)[src]

Wait for this trigger synchronously.

Blocks the current thread until the corresponding Trigger is triggered. If the trigger has already been triggered at least once, this returns immediately.

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

Returns true if this trigger has been triggered.

Trait Implementations

impl Clone for Listener[src]

impl Debug for Listener[src]

impl Future for Listener[src]

type Output = ()

The type of value produced on completion.

impl Unpin for Listener[src]

Auto Trait Implementations

impl !RefUnwindSafe for Listener

impl Send for Listener

impl Sync for Listener

impl !UnwindSafe for Listener

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