Struct triggered::Trigger [−][src]
pub struct Trigger { /* fields omitted */ }
Expand description
A struct used to trigger Listener
s it is paired with.
Can be cloned to create multiple instances that all trigger the same listeners.
Implementations
Trigger all Listener
s paired with this trigger.
Makes all listeners currently blocked in Listener::wait
return,
and all that is being await
ed finish.
Calling this method only does anything the first time. Any subsequent trigger call to the same instance or a clone thereof does nothing, it has already been triggered. Any listener waiting on the trigger after it has been triggered will just return instantly.
This method is safe to call from both async and sync code. It’s not an async function, but it always finishes very fast.
Returns true if this trigger has been triggered.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Trigger
impl !UnwindSafe for Trigger
Blanket Implementations
Mutably borrows from an owned value. Read more