Struct teehistorian::Th
source · [−]pub struct Th<T: ThBufRead> { /* private fields */ }
Implementations
sourceimpl<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 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> 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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more