pub struct Bus<M, S, C>{ /* private fields */ }Expand description
A generic implementation of an event bus using std::sync::mpsc
Implementations§
Trait Implementations§
Source§impl<M, S, C> EventDistributor for Bus<M, S, C>
impl<M, S, C> EventDistributor for Bus<M, S, C>
type Event = M
type Error = BusError
type EventSender = Sender<M>
type SubscriptionSender = Sender<S>
type TerminationCondition = C
fn get_event_sink(&self) -> Self::EventSender
fn get_subscrition_sink(&self) -> Self::SubscriptionSender
Auto Trait Implementations§
impl<M, S, C> Freeze for Bus<M, S, C>where
C: Freeze,
impl<M, S, C> RefUnwindSafe for Bus<M, S, C>where
C: RefUnwindSafe,
S: RefUnwindSafe,
impl<M, S, C> Send for Bus<M, S, C>
impl<M, S, C> !Sync for Bus<M, S, C>
impl<M, S, C> Unpin for Bus<M, S, C>
impl<M, S, C> UnwindSafe for Bus<M, S, C>where
C: UnwindSafe,
S: UnwindSafe,
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