UnifiedLogRead

Trait UnifiedLogRead 

pub trait UnifiedLogRead {
    // Required methods
    fn read_next_section_type(
        &mut self,
        datalogtype: UnifiedLogType,
    ) -> Result<Option<Vec<u8>>, CuError>;
    fn raw_read_section(&mut self) -> Result<(SectionHeader, Vec<u8>), CuError>;
}
Expand description

Read back a unified log linearly.

Required Methods§

fn read_next_section_type( &mut self, datalogtype: UnifiedLogType, ) -> Result<Option<Vec<u8>>, CuError>

Read through the unified logger until it reaches the UnifiedLogType given in datalogtype. It will return the byte array of the section if found.

fn raw_read_section(&mut self) -> Result<(SectionHeader, Vec<u8>), CuError>

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§