pub trait Consumer: Send + 'static {
type Item: Send + 'static;
type Snap: Snapshot;
// Required methods
fn replay(&mut self, snapshot: Self::Snap);
fn consume(&mut self, item: Self::Item);
}Expand description
A consumer of producer items + snapshots. Mirrors the producer’s associated types so the type-checker enforces compatible pairs.
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".