pub struct SqliteLog { /* private fields */ }Implementations§
Source§impl SqliteLog
impl SqliteLog
Sourcepub fn open(
path: impl AsRef<Path>,
options: SqliteOptions,
) -> Result<Self, LinkError>
pub fn open( path: impl AsRef<Path>, options: SqliteOptions, ) -> Result<Self, LinkError>
Opens a dedicated database. Default builds have no SQLite dependency. Requires a same-host filesystem/VFS implementing SQLite WAL locking and truthful synchronization; all sidecars belong to the database.
Sourcepub fn checkpoint(
&mut self,
mode: CheckpointMode,
) -> Result<CheckpointResult, LinkError>
pub fn checkpoint( &mut self, mode: CheckpointMode, ) -> Result<CheckpointResult, LinkError>
Explicit physical page maintenance. Logical journal records are retained. Pending appends reject without poisoning. Reader contention is returned in the counters, bounded by the configured SQLite busy interval.
Trait Implementations§
Source§impl TransitionLogStore for SqliteLog
impl TransitionLogStore for SqliteLog
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 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 append_log_entry(&mut self, record: &str) -> Result<(), LinkError>
fn append_log_entry(&mut self, record: &str) -> Result<(), LinkError>
Appends one entry. Entries never contain newlines.
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 !Freeze for SqliteLog
impl !RefUnwindSafe for SqliteLog
impl !Sync for SqliteLog
impl Send for SqliteLog
impl Unpin for SqliteLog
impl UnsafeUnpin for SqliteLog
impl UnwindSafe for SqliteLog
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