UnifiedLogRead

Trait UnifiedLogRead 

Source
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§

Source

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.

Source

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.

Implementors§