pub struct PagedLog<D> { /* private fields */ }Expand description
Immutable committed doublets pages and alternating metadata decisions. Appends stage UTF-8 strings; flush publishes the complete pending group. Read/flush errors fence this owner; reopen and discover an uncertain outcome. Extraction transfers device ownership without flushing pending records.
Implementations§
Source§impl<D: PageDevice> PagedLog<D>
impl<D: PageDevice> PagedLog<D>
Trait Implementations§
Source§impl<D: PageDevice> TransitionLogStore for PagedLog<D>
impl<D: PageDevice> TransitionLogStore for PagedLog<D>
Source§fn supports_durable_flush(&self) -> bool
fn supports_durable_flush(&self) -> bool
Whether flush requests persistent storage. Custom/volatile logs default
to false; this describes an adapter, not the reliability of its hardware.
Source§fn append_log_entry(&mut self, entry: &str) -> Result<(), LinkError>
fn append_log_entry(&mut self, entry: &str) -> Result<(), LinkError>
Appends one entry. Entries never contain newlines.
Source§fn read_log_entries(&mut self) -> Result<Vec<String>, LinkError>
fn read_log_entries(&mut self) -> Result<Vec<String>, LinkError>
Reads every entry back, oldest first.
Source§fn supports_compaction(&self) -> bool
fn supports_compaction(&self) -> bool
Whether
compact_log_entries can rewrite
the durable journal. Retention uses it to bound the journal on disk;
logs without it keep every entry, as before.Source§fn compact_log_entries(&mut self, entries: &[String]) -> Result<(), LinkError>
fn compact_log_entries(&mut self, entries: &[String]) -> Result<(), LinkError>
Atomically and durably replaces every entry with
entries, the
retained journal. After a crash the log holds either the old or the
new journal, never a mixture. Called only between transactions and
only when supports_compaction is true.Auto Trait Implementations§
impl<D> Freeze for PagedLog<D>where
D: Freeze,
impl<D> RefUnwindSafe for PagedLog<D>where
D: RefUnwindSafe,
impl<D> Send for PagedLog<D>where
D: Send,
impl<D> Sync for PagedLog<D>where
D: Sync,
impl<D> Unpin for PagedLog<D>where
D: Unpin,
impl<D> UnsafeUnpin for PagedLog<D>where
D: UnsafeUnpin,
impl<D> UnwindSafe for PagedLog<D>where
D: 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