Skip to main content

SqliteSyncStore

Struct SqliteSyncStore 

Source
pub struct SqliteSyncStore { /* private fields */ }
Expand description

Shared owner of one bounded SQLite sync database.

Implementations§

Source§

impl SqliteSyncStore

Source

pub fn online_backup( &self, destination: impl AsRef<Path>, ) -> SqliteSyncResult<SqliteBackupReport>

Creates an integrity-checked online backup and atomically publishes it.

Source

pub fn restore_backup_to_new( backup_path: impl AsRef<Path>, destination: impl AsRef<Path>, ) -> SqliteSyncResult<SqliteBackupReport>

Restores a verified backup into a new, previously absent database path.

Source§

impl SqliteSyncStore

Source

pub fn conflict_store(&self) -> SqliteSyncConflictStore

Returns a conflict store sharing this database and its integrity/backup boundary.

Source§

impl SqliteSyncStore

Source

pub fn pending_object_writes( &self, installation: &str, limit: usize, max_bytes: usize, ) -> SqliteSyncResult<Vec<ObjectWriteIntentV1>>

Returns a FIFO bounded page of outstanding intents for one installation. Materialize idempotently in this order under application-owned object locks.

Source

pub fn acknowledge_object_write( &self, installation: &str, id: &str, observed_sha256: &str, ) -> SqliteSyncResult<bool>

Removes only the installation’s oldest intent after the caller has synced and verified the actual materialized envelope. Same receipt replay returns false after removal; an ID must never be reused once an intent is completed. This records caller evidence, not an independent filesystem verification.

Source§

impl SqliteSyncStore

Source

pub fn open(config: SqliteSyncConfig) -> SqliteSyncResult<Self>

Opens, migrates and integrity-checks one provider database.

Source

pub fn health(&self) -> SqliteSyncResult<SqliteSyncHealth>

Runs an integrity check and reports bounded database usage.

Source

pub fn config(&self) -> &SqliteSyncConfig

Returns the provider’s redacted configuration bounds.

Source

pub fn replication_log(&self) -> SqliteReplicationLog

Creates a replication-log handle backed by this database.

Source

pub fn checkpoint_store(&self) -> SqliteSyncCheckpointStore

Creates a checkpoint-store handle backed by this database.

Source

pub fn outbox(&self) -> SqliteSyncOutbox

Creates an outbox handle backed by this database.

Source

pub fn tombstone_store(&self) -> SqliteSyncTombstoneStore

Creates an opaque tombstone-store handle backed by this database.

Source§

impl SqliteSyncStore

Source

pub fn transaction<T>( &self, action: impl FnOnce(&mut SqliteSyncWork<'_>) -> SqliteSyncResult<T>, ) -> SqliteSyncResult<T>

Commits all operations only when the callback succeeds. An error or unwind drops the transaction and rolls back every operation. At most 1,024 operations may be submitted. The deployment owns callback execution bounds.

Source§

impl SqliteSyncStore

Source

pub fn opaque_objects_v1(&self) -> SqliteOpaqueObjectStoreV1

Returns a handle to canonical objects in the same database as the sync state.

Trait Implementations§

Source§

impl Clone for SqliteSyncStore

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SqliteSyncStore

Source§

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

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

impl StorageCapabilityProviderV1 for SqliteSyncStore

Source§

fn storage_capabilities_v1( &self, ) -> Result<StorageCapabilityDescriptorV1, StorageCapabilityError>

Returns an immutable descriptor without probing or opening the provider.

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V