pub struct ReaderId<T: 'static> { /* private fields */ }
Expand description
A reader ID which represents a subscription to the events pushed to the
EventChannel
.
For each reader ID, the last read event is tracked; this way, the buffer
gets grown whenever it would overwrite an event which was not yet observed
by every ReaderId
.
Dropping a ReaderId
effectively cancels the subscription to those events.
Note that as long as a ReaderId
exists, it is crucial to use it to read
the events; otherwise the buffer of the EventChannel
will keep
growing.
Trait Implementations
Auto Trait Implementations
impl<T> !RefUnwindSafe for ReaderId<T>
impl<T> Send for ReaderId<T> where
T: Sync,
impl<T> Sync for ReaderId<T> where
T: Sync,
impl<T> Unpin for ReaderId<T>
impl<T> !UnwindSafe for ReaderId<T>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more