pub struct Subscribable<T: Copy> { /* private fields */ }Expand description
Clone-able handle for spawning Subscribers.
Send this to other threads and call subscribe
to create independent consumers.
Implementations§
Source§impl<T: Copy> Subscribable<T>
impl<T: Copy> Subscribable<T>
Sourcepub fn subscribe(&self) -> Subscriber<T>
pub fn subscribe(&self) -> Subscriber<T>
Create a subscriber that will see only future messages.
Sourcepub fn subscribe_from_oldest(&self) -> Subscriber<T>
pub fn subscribe_from_oldest(&self) -> Subscriber<T>
Create a subscriber starting from the oldest available message still in the ring (or 0 if nothing published yet).
Trait Implementations§
Source§impl<T: Copy> Clone for Subscribable<T>
impl<T: Copy> Clone for Subscribable<T>
impl<T: Copy + Send> Send for Subscribable<T>
impl<T: Copy + Send> Sync for Subscribable<T>
Auto Trait Implementations§
impl<T> Freeze for Subscribable<T>
impl<T> !RefUnwindSafe for Subscribable<T>
impl<T> Unpin for Subscribable<T>
impl<T> UnsafeUnpin for Subscribable<T>
impl<T> !UnwindSafe for Subscribable<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