pub struct EventManager { /* private fields */ }Expand description
Builder that holds the set of sinks to register before the bus starts.
Implementations§
Source§impl EventManager
impl EventManager
pub fn new() -> Self
Sourcepub fn register(&mut self, sink: Box<dyn EventSink>) -> &mut Self
pub fn register(&mut self, sink: Box<dyn EventSink>) -> &mut Self
Register a sink. Sinks receive events in the order they were registered.
pub fn is_empty(&self) -> bool
Sourcepub fn start(self) -> EventBusHandle
pub fn start(self) -> EventBusHandle
Spawn the background dispatch task and return a live handle.
Trait Implementations§
Source§impl Default for EventManager
impl Default for EventManager
Source§fn default() -> EventManager
fn default() -> EventManager
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for EventManager
impl !RefUnwindSafe for EventManager
impl Send for EventManager
impl Sync for EventManager
impl Unpin for EventManager
impl UnsafeUnpin for EventManager
impl !UnwindSafe for EventManager
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more