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§
sourcefn append_done(
&self,
buffer: &'static mut [u8],
length: usize,
records_lost: bool,
error: Result<(), ErrorCode>,
)
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).
sourcefn sync_done(&self, error: Result<(), ErrorCode>)
fn sync_done(&self, error: Result<(), ErrorCode>)
Returns whether or not all pages were correctly synced, making all changes persistent.
sourcefn erase_done(&self, error: Result<(), ErrorCode>)
fn erase_done(&self, error: Result<(), ErrorCode>)
Returns whether or not all pages of the log were erased.