Trait kernel::hil::log::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§