pub struct FlashJournal<F>where
F: NorFlash,{ /* private fields */ }Implementations§
Source§impl<F> FlashJournal<F>where
F: NorFlash,
impl<F> FlashJournal<F>where
F: NorFlash,
pub async fn inspect_timebase( flash: &mut F, layout: FlashJournalLayout, ) -> Result<Option<InstantMillis>, FlashJournalError<<F as ErrorType>::Error>>
pub async fn inspect_timebase_state( flash: &mut F, layout: FlashJournalLayout, ) -> Result<FlashJournalTimebaseState, FlashJournalError<<F as ErrorType>::Error>>
pub async fn open( flash: F, layout: FlashJournalLayout, scratch: &mut [u8], on_record: impl FnMut(FlashJournalRecord<'_>), ) -> Result<(FlashJournal<F>, FlashJournalRestoreReport), FlashJournalError<<F as ErrorType>::Error>>
pub fn release(self) -> F
pub fn layout(&self) -> FlashJournalLayout
pub fn active_epoch(&self) -> Option<u64>
pub fn active_remaining_bytes(&self) -> Option<usize>
pub fn active_can_fit(&self, payload_len: usize, reserve_bytes: usize) -> bool
pub async fn initialize_empty( &mut self, ) -> Result<(), FlashJournalError<<F as ErrorType>::Error>>
pub async fn append( &mut self, kind: FlashJournalRecordKind, payload: &[u8], ) -> Result<(), FlashJournalError<<F as ErrorType>::Error>>
pub fn inactive_sector_count(&self) -> usize
pub async fn erase_inactive_sector( &mut self, sector: usize, ) -> Result<(), FlashJournalError<<F as ErrorType>::Error>>
pub fn begin_compaction( &mut self, ) -> Result<(), FlashJournalError<<F as ErrorType>::Error>>
pub async fn append_compacted( &mut self, kind: FlashJournalRecordKind, payload: &[u8], ) -> Result<(), FlashJournalError<<F as ErrorType>::Error>>
pub async fn commit_compaction( &mut self, ) -> Result<(), FlashJournalError<<F as ErrorType>::Error>>
pub fn abort_compaction(&mut self)
pub async fn timebase_high_water( &mut self, ) -> Result<Option<InstantMillis>, FlashJournalError<<F as ErrorType>::Error>>
pub async fn record_timebase( &mut self, now: InstantMillis, ) -> Result<(), FlashJournalError<<F as ErrorType>::Error>>
pub async fn record_compaction_budget( &mut self, attempted_at: InstantMillis, ) -> Result<InstantMillis, FlashJournalError<<F as ErrorType>::Error>>
Auto Trait Implementations§
impl<F> Freeze for FlashJournal<F>where
F: Freeze,
impl<F> RefUnwindSafe for FlashJournal<F>where
F: RefUnwindSafe,
impl<F> Send for FlashJournal<F>where
F: Send,
impl<F> Sync for FlashJournal<F>where
F: Sync,
impl<F> Unpin for FlashJournal<F>where
F: Unpin,
impl<F> UnsafeUnpin for FlashJournal<F>where
F: UnsafeUnpin,
impl<F> UnwindSafe for FlashJournal<F>where
F: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more