Skip to main content

SqliteLog

Struct SqliteLog 

Source
pub struct SqliteLog { /* private fields */ }

Implementations§

Source§

impl SqliteLog

Source

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.

Source

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 Debug for SqliteLog

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Drop for SqliteLog

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more
Source§

impl TransitionLogStore for SqliteLog

Source§

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>

Reads every entry back, oldest first.
Source§

fn append_log_entry(&mut self, record: &str) -> Result<(), LinkError>

Appends one entry. Entries never contain newlines.
Source§

fn flush_log(&mut self) -> Result<(), LinkError>

Makes every appended entry durable.
Source§

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>

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§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.