[−][src]Struct triggered::Listener
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.
fn poll(self: Pin<&mut Self>, cx: &mut Context) -> Poll<Self::Output>
[src]
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,