Struct bifrost::Relay [−][src]
pub struct Relay<Context: Send> { /* fields omitted */ }
A structure used to send events and commands to a Dispatcher.
Relays are lightweight, cloneable and can be sent across threads and channels
You can get a relay from a Dispatcher with the create_relay
method
let relay = dispatcher.create_relay();
Or by cloning another relay
let relay_clone = relay.clone();
Methods
impl<Context: Send> Relay<Context>
[src]
impl<Context: Send> Relay<Context>
pub fn send<E: Event<Context> + Send + 'static>(&self, event: E)
[src]
pub fn send<E: Event<Context> + Send + 'static>(&self, event: E)
pub fn schedule<E: Event<Context> + Send + 'static>(
&self,
event: E,
delay: Duration
)
[src]
pub fn schedule<E: Event<Context> + Send + 'static>(
&self,
event: E,
delay: Duration
)
pub fn stop(&self)
[src]
pub fn stop(&self)