Struct shrev::ReaderId [−][src]
pub struct ReaderId<T: 'static> { /* fields omitted */ }
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.