Struct teehistorian::Th
source · pub struct Th<T: ThBufRead> { /* private fields */ }
Implementations§
source§impl<T: ThBufRead> Th<T>
impl<T: ThBufRead> Th<T>
pub fn parse(inp: T) -> Result<Self, Error>
sourcepub fn header(&mut self) -> Result<&[u8], Error>
pub fn header(&mut self) -> Result<&[u8], Error>
Tries to parse the teehistorian header returns a byte slice to a json object excluding without the null terminator present in the teehistorian format
§Panic
header()
must only be called before the first chunk is requested with next_chunk()
Otherwise the functions panics.
pub fn next_chunk(&mut self) -> Result<Chunk<'_>, Error>
sourcepub fn reset_chunk(&mut self)
pub fn reset_chunk(&mut self)
reset parser to before last next_chunk
call. Can be only called once after each
next_chunk
call. The next next_chunk
call will return the same as the previous one.
sourcepub fn reuse_buffer(self) -> T
pub fn reuse_buffer(self) -> T
Extract the buffer to reuse in a new teehistorian file
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Th<T>where
T: Freeze,
impl<T> RefUnwindSafe for Th<T>where
T: RefUnwindSafe,
impl<T> Send for Th<T>where
T: Send,
impl<T> Sync for Th<T>where
T: Sync,
impl<T> Unpin for Th<T>where
T: Unpin,
impl<T> UnwindSafe for Th<T>where
T: 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