pub struct Consumer<T> { /* private fields */ }Expand description
Consumes an ordered log of JSON records from a track, yielding every record in order.
The log rides a single group, so this reads that group’s frames in order; one record per frame.
Implementations§
Source§impl<T: DeserializeOwned> Consumer<T>
impl<T: DeserializeOwned> Consumer<T>
Sourcepub fn new(track: TrackConsumer, config: ConsumerConfig) -> Self
pub fn new(track: TrackConsumer, 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