pub struct Consumer<T> { /* private fields */ }Expand description
Consumes an ordered log of JSON records from a track, yielding every record in order.
A Decoder that owns its track: it reads one record per frame, in order, and starts the
decoder on a cold window at each group boundary. A Producer writes the whole
log into one group, but a publisher that rolls its own (the way an
Encoder desync is cleared) is read here too. When something else already owns
the track, use the Decoder directly.
Implementations§
Source§impl<T: DeserializeOwned> Consumer<T>
impl<T: DeserializeOwned> Consumer<T>
Sourcepub fn new(track: Subscriber, config: ConsumerConfig) -> Self
pub fn new(track: Subscriber, config: ConsumerConfig) -> Self
Create a consumer reading from the given track subscriber.
Set ConsumerConfig::compression to read a track written by a producer with
ProducerConfig::compression on.
Auto Trait Implementations§
impl<T> !Freeze for Consumer<T>
impl<T> RefUnwindSafe for Consumer<T>
impl<T> Send for Consumer<T>
impl<T> Sync for Consumer<T>
impl<T> Unpin for Consumer<T>
impl<T> UnsafeUnpin for Consumer<T>
impl<T> UnwindSafe for Consumer<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