pub struct EventSubscribable<T> { /* private fields */ }Expand description
Clone-able handle for creating subscribers.
Implementations§
Source§impl<T> EventSubscribable<T>
impl<T> EventSubscribable<T>
Sourcepub fn subscribe(&self) -> EventSubscriber<T>
pub fn subscribe(&self) -> EventSubscriber<T>
Create a subscriber, starting from the next message published.
Every subscriber gates the publisher, so one that stops reading will stop the ring. Dropping it releases the publisher again.
Trait Implementations§
Source§impl<T> Clone for EventSubscribable<T>
impl<T> Clone for EventSubscribable<T>
impl<T: Send + Sync> Send for EventSubscribable<T>
impl<T: Send + Sync> Sync for EventSubscribable<T>
Auto Trait Implementations§
impl<T> !RefUnwindSafe for EventSubscribable<T>
impl<T> !UnwindSafe for EventSubscribable<T>
impl<T> Freeze for EventSubscribable<T>
impl<T> Unpin for EventSubscribable<T>
impl<T> UnsafeUnpin for EventSubscribable<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