pub trait UnifiedLogRead {
// Required methods
fn read_next_section_type(
&mut self,
datalogtype: UnifiedLogType,
) -> CuResult<Option<Vec<u8>>>;
fn raw_read_section(&mut self) -> CuResult<(SectionHeader, Vec<u8>)>;
}
Expand description
Read back a unified log linearly.
Required Methods§
Sourcefn read_next_section_type(
&mut self,
datalogtype: UnifiedLogType,
) -> CuResult<Option<Vec<u8>>>
fn read_next_section_type( &mut self, datalogtype: UnifiedLogType, ) -> CuResult<Option<Vec<u8>>>
Read through the unified logger until it reaches the UnifiedLogType given in datalogtype. It will return the byte array of the section if found.
Sourcefn raw_read_section(&mut self) -> CuResult<(SectionHeader, Vec<u8>)>
fn raw_read_section(&mut self) -> CuResult<(SectionHeader, Vec<u8>)>
Read through the next section entry regardless of its type. It will return the header and the byte array of the section. Note the last Entry should be of UnifiedLogType::LastEntry if the log is not corrupted.