pub struct SqliteReplicationLog { /* private fields */ }Expand description
SQLite-backed implementation of the AppCore replication-log contract.
Implementations§
Source§impl SqliteReplicationLog
impl SqliteReplicationLog
Sourcepub fn events_page(
&self,
index: usize,
max_records: usize,
) -> SyncResult<Vec<Vec<u8>>>
pub fn events_page( &self, index: usize, max_records: usize, ) -> SyncResult<Vec<Vec<u8>>>
Reads one bounded page after the supplied zero-based log offset.
Trait Implementations§
Source§impl Clone for SqliteReplicationLog
impl Clone for SqliteReplicationLog
Source§fn clone(&self) -> SqliteReplicationLog
fn clone(&self) -> SqliteReplicationLog
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SqliteReplicationLog
impl Debug for SqliteReplicationLog
Source§impl ReplicationLog for SqliteReplicationLog
impl ReplicationLog for SqliteReplicationLog
Source§fn append(&mut self, record: Vec<u8>) -> SyncResult<usize>
fn append(&mut self, record: Vec<u8>) -> SyncResult<usize>
Appends an unsequenced record and returns its one-based log index.
Source§fn append_with_sequence(
&mut self,
record: Vec<u8>,
sequence: u64,
) -> SyncResult<usize>
fn append_with_sequence( &mut self, record: Vec<u8>, sequence: u64, ) -> SyncResult<usize>
Idempotently appends
record at a source sequence.Source§fn event_at_sequence(&self, sequence: u64) -> SyncResult<Option<Vec<u8>>>
fn event_at_sequence(&self, sequence: u64) -> SyncResult<Option<Vec<u8>>>
Returns the payload at a source sequence when sequence lookup is supported.
Source§fn events_since(&self, index: usize) -> SyncResult<Vec<Vec<u8>>>
fn events_since(&self, index: usize) -> SyncResult<Vec<Vec<u8>>>
Returns payloads after the supplied zero-based log offset.
Source§fn last_index(&self) -> SyncResult<usize>
fn last_index(&self) -> SyncResult<usize>
Returns the one-based final log index, or zero for an empty log.
Source§fn len(&self) -> SyncResult<usize>
fn len(&self) -> SyncResult<usize>
Returns the number of records in the log.
Source§fn is_empty(&self) -> SyncResult<bool>
fn is_empty(&self) -> SyncResult<bool>
Reports whether the log contains no records.
Source§fn create_snapshot(&self) -> SyncResult<ReplicationSnapshot>
fn create_snapshot(&self) -> SyncResult<ReplicationSnapshot>
Creates a validated portable snapshot when supported.
Source§fn restore_snapshot(&mut self, snapshot: &ReplicationSnapshot) -> SyncResult<()>
fn restore_snapshot(&mut self, snapshot: &ReplicationSnapshot) -> SyncResult<()>
Atomically replaces log contents from a validated snapshot when supported.
Auto Trait Implementations§
impl !RefUnwindSafe for SqliteReplicationLog
impl !UnwindSafe for SqliteReplicationLog
impl Freeze for SqliteReplicationLog
impl Send for SqliteReplicationLog
impl Sync for SqliteReplicationLog
impl Unpin for SqliteReplicationLog
impl UnsafeUnpin for SqliteReplicationLog
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