pub struct EventBus<T: RoutableEvent> { /* private fields */ }Expand description
The read end: hands out Subscriptions. Cheap to clone and share.
Implementations§
Source§impl<T: RoutableEvent> EventBus<T>
impl<T: RoutableEvent> EventBus<T>
Sourcepub fn subscribe(&self, target: T::Target) -> Subscription<T>
pub fn subscribe(&self, target: T::Target) -> Subscription<T>
Subscribe to every event routed to target.
Trait Implementations§
Source§impl<T: RoutableEvent> Clone for EventBus<T>
impl<T: RoutableEvent> Clone for EventBus<T>
Source§impl<T: RoutableEvent> EventHandler<T> for EventBus<T>
impl<T: RoutableEvent> EventHandler<T> for EventBus<T>
Auto Trait Implementations§
impl<T> Freeze for EventBus<T>
impl<T> RefUnwindSafe for EventBus<T>
impl<T> Send for EventBus<T>
impl<T> Sync for EventBus<T>
impl<T> Unpin for EventBus<T>
impl<T> UnsafeUnpin for EventBus<T>
impl<T> UnwindSafe for EventBus<T>
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