pub struct MetricsLogReader<R: Read> {
pub header: LogHeader,
/* private fields */
}
Expand description
A streaming reader for metric logs. If the underlying reader supports seeks, it is possible to get SeekTokens which may be used to seek to previous frames in the stream.
Fields§
§header: LogHeader
Implementations§
Source§impl<R: Read> MetricsLogReader<R>
impl<R: Read> MetricsLogReader<R>
Sourcepub fn read_frame(
&mut self,
) -> Result<Option<(UnixTimestampMilliseconds, Frame)>>
pub fn read_frame( &mut self, ) -> Result<Option<(UnixTimestampMilliseconds, Frame)>>
Reads a frame. Returns the start time of the frame and the frame itself.
Source§impl<R: Read + Seek> MetricsLogReader<R>
impl<R: Read + Seek> MetricsLogReader<R>
Sourcepub fn read_frame_rewindable(
&mut self,
) -> Result<Option<(SeekToken, UnixTimestampMilliseconds, Frame)>>
pub fn read_frame_rewindable( &mut self, ) -> Result<Option<(SeekToken, UnixTimestampMilliseconds, Frame)>>
Reads a new frame, and returns a seek token that can be used to rewind such that you can ‘undo’ the read.
Auto Trait Implementations§
impl<R> Freeze for MetricsLogReader<R>where
R: Freeze,
impl<R> RefUnwindSafe for MetricsLogReader<R>where
R: RefUnwindSafe,
impl<R> Send for MetricsLogReader<R>where
R: Send,
impl<R> Sync for MetricsLogReader<R>where
R: Sync,
impl<R> Unpin for MetricsLogReader<R>where
R: Unpin,
impl<R> UnwindSafe for MetricsLogReader<R>where
R: UnwindSafe,
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