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.