kernel::hil::log

Trait LogWriteClient

Source
pub trait LogWriteClient {
    // Required methods
    fn append_done(
        &self,
        buffer: &'static mut [u8],
        length: usize,
        records_lost: bool,
        error: Result<(), ErrorCode>,
    );
    fn sync_done(&self, error: Result<(), ErrorCode>);
    fn erase_done(&self, error: Result<(), ErrorCode>);
}
Expand description

Receive callbacks from LogWrite.

Required Methods§

Source

fn append_done( &self, buffer: &'static mut [u8], length: usize, records_lost: bool, error: Result<(), ErrorCode>, )

Returns the original buffer that contained the data to write, the number of bytes written, and whether any old entries in the log were lost (due to a circular log being filled up).

Source

fn sync_done(&self, error: Result<(), ErrorCode>)

Returns whether or not all pages were correctly synced, making all changes persistent.

Source

fn erase_done(&self, error: Result<(), ErrorCode>)

Returns whether or not all pages of the log were erased.

Implementors§