pub struct PbFileReader { /* private fields */ }Expand description
Reads a PlainPB file, yielding one ArchiverSample per line. Uses binary-safe line reading (read_until) since PB data may contain non-UTF8 bytes.
Implementations§
Source§impl PbFileReader
impl PbFileReader
Sourcepub fn open(path: &Path) -> Result<Self>
pub fn open(path: &Path) -> Result<Self>
Open a PB file. Reads and parses the PayloadInfo header from the first line.
Sourcepub fn open_seeked(path: &Path, start_time: SystemTime) -> Result<Self>
pub fn open_seeked(path: &Path, start_time: SystemTime) -> Result<Self>
Open a PB file and seek to the first sample >= start_time using binary search. Falls back to reading from the beginning if binary search finds nothing or fails.
Trait Implementations§
Source§impl EventStream for PbFileReader
impl EventStream for PbFileReader
fn description(&self) -> &EventStreamDesc
fn next_event(&mut self) -> Result<Option<ArchiverSample>>
Auto Trait Implementations§
impl Freeze for PbFileReader
impl RefUnwindSafe for PbFileReader
impl Send for PbFileReader
impl Sync for PbFileReader
impl Unpin for PbFileReader
impl UnsafeUnpin for PbFileReader
impl UnwindSafe for PbFileReader
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