Skip to main content

SyncStoreTx

Trait SyncStoreTx 

Source
pub trait SyncStoreTx {
Show 29 methods // Required methods fn pending_outbox(&mut self, limit: i64) -> Result<Vec<OutboxCommit>>; fn requeue_stale_outbox(&mut self) -> Result<()>; fn mark_outbox_sending(&mut self, row_id: &str) -> Result<()>; fn mark_outbox_acked( &mut self, row_id: &str, response: &PushCommitResponse, ) -> Result<()>; fn mark_outbox_failed( &mut self, row_id: &str, error: &str, response: &PushCommitResponse, ) -> Result<()>; fn mark_outbox_retry( &mut self, row_id: &str, error: &str, next_attempt_at: i64, failed: bool, ) -> Result<()>; fn insert_conflict( &mut self, outbox: &OutboxCommit, result: &OperationResult, ) -> Result<()>; fn subscription_state( &mut self, state_id: &str, subscription_id: &str, ) -> Result<Option<SubscriptionState>>; fn upsert_subscription_state( &mut self, state: &SubscriptionState, ) -> Result<()>; fn delete_subscription_state( &mut self, state_id: &str, subscription_id: &str, ) -> Result<()>; fn clear_table_for_scopes( &mut self, table: &str, scopes: &ScopeValues, ) -> Result<()>; fn upsert_row( &mut self, table: &str, row: &Value, fallback_version: Option<i64>, ) -> Result<()>; fn apply_change(&mut self, change: &SyncChange) -> Result<()>; // Provided methods fn mark_pushed_operation_server_versions( &mut self, _outbox: &OutboxCommit, _response: &PushCommitResponse, ) -> Result<()> { ... } fn upsert_auth_lease(&mut self, _lease: &AuthLeaseRecord) -> Result<()> { ... } fn auth_lease(&mut self, _lease_id: &str) -> Result<Option<AuthLeaseRecord>> { ... } fn active_auth_leases( &mut self, _actor_id: Option<&str>, _now_ms: i64, ) -> Result<Vec<AuthLeaseRecord>> { ... } fn set_outbox_auth_lease( &mut self, _client_commit_id: &str, _provenance: Option<&AuthLeaseProvenance>, ) -> Result<()> { ... } fn subscription_states( &mut self, _state_id: &str, ) -> Result<Vec<SubscriptionState>> { ... } fn verified_root( &mut self, _state_id: &str, _subscription_id: &str, ) -> Result<Option<VerifiedRoot>> { ... } fn verified_roots(&mut self, _state_id: &str) -> Result<Vec<VerifiedRoot>> { ... } fn upsert_verified_root(&mut self, _root: &VerifiedRoot) -> Result<()> { ... } fn delete_verified_root( &mut self, _state_id: &str, _subscription_id: &str, ) -> Result<()> { ... } fn crdt_state_vector_hints( &mut self, _table: &str, _scopes: &ScopeValues, _limit: i64, ) -> Result<Vec<CrdtStateVectorHint>> { ... } fn clear_synced_rows_for_scopes( &mut self, _table: &str, _scopes: &ScopeValues, ) -> Result<i64> { ... } fn clear_table_for_scopes_preserving_local_crdt( &mut self, table: &str, scopes: &ScopeValues, ) -> Result<()> { ... } fn current_row_json( &mut self, _table: &str, _row_id: &str, ) -> Result<Option<Value>> { ... } fn upsert_rows( &mut self, table: &str, rows: &[Value], fallback_version: Option<i64>, ) -> Result<()> { ... } fn upsert_snapshot_chunk_rows( &mut self, table: &str, rows: &SnapshotChunkRows, fallback_version: Option<i64>, ) -> Result<()> { ... }
}

Required Methods§

Source

fn pending_outbox(&mut self, limit: i64) -> Result<Vec<OutboxCommit>>

Source

fn requeue_stale_outbox(&mut self) -> Result<()>

Source

fn mark_outbox_sending(&mut self, row_id: &str) -> Result<()>

Source

fn mark_outbox_acked( &mut self, row_id: &str, response: &PushCommitResponse, ) -> Result<()>

Source

fn mark_outbox_failed( &mut self, row_id: &str, error: &str, response: &PushCommitResponse, ) -> Result<()>

Source

fn mark_outbox_retry( &mut self, row_id: &str, error: &str, next_attempt_at: i64, failed: bool, ) -> Result<()>

Source

fn insert_conflict( &mut self, outbox: &OutboxCommit, result: &OperationResult, ) -> Result<()>

Source

fn subscription_state( &mut self, state_id: &str, subscription_id: &str, ) -> Result<Option<SubscriptionState>>

Source

fn upsert_subscription_state(&mut self, state: &SubscriptionState) -> Result<()>

Source

fn delete_subscription_state( &mut self, state_id: &str, subscription_id: &str, ) -> Result<()>

Source

fn clear_table_for_scopes( &mut self, table: &str, scopes: &ScopeValues, ) -> Result<()>

Source

fn upsert_row( &mut self, table: &str, row: &Value, fallback_version: Option<i64>, ) -> Result<()>

Source

fn apply_change(&mut self, change: &SyncChange) -> Result<()>

Provided Methods§

Source

fn mark_pushed_operation_server_versions( &mut self, _outbox: &OutboxCommit, _response: &PushCommitResponse, ) -> Result<()>

Source

fn upsert_auth_lease(&mut self, _lease: &AuthLeaseRecord) -> Result<()>

Source

fn auth_lease(&mut self, _lease_id: &str) -> Result<Option<AuthLeaseRecord>>

Source

fn active_auth_leases( &mut self, _actor_id: Option<&str>, _now_ms: i64, ) -> Result<Vec<AuthLeaseRecord>>

Source

fn set_outbox_auth_lease( &mut self, _client_commit_id: &str, _provenance: Option<&AuthLeaseProvenance>, ) -> Result<()>

Source

fn subscription_states( &mut self, _state_id: &str, ) -> Result<Vec<SubscriptionState>>

Source

fn verified_root( &mut self, _state_id: &str, _subscription_id: &str, ) -> Result<Option<VerifiedRoot>>

Source

fn verified_roots(&mut self, _state_id: &str) -> Result<Vec<VerifiedRoot>>

Source

fn upsert_verified_root(&mut self, _root: &VerifiedRoot) -> Result<()>

Source

fn delete_verified_root( &mut self, _state_id: &str, _subscription_id: &str, ) -> Result<()>

Source

fn crdt_state_vector_hints( &mut self, _table: &str, _scopes: &ScopeValues, _limit: i64, ) -> Result<Vec<CrdtStateVectorHint>>

Source

fn clear_synced_rows_for_scopes( &mut self, _table: &str, _scopes: &ScopeValues, ) -> Result<i64>

Source

fn clear_table_for_scopes_preserving_local_crdt( &mut self, table: &str, scopes: &ScopeValues, ) -> Result<()>

Source

fn current_row_json( &mut self, _table: &str, _row_id: &str, ) -> Result<Option<Value>>

Source

fn upsert_rows( &mut self, table: &str, rows: &[Value], fallback_version: Option<i64>, ) -> Result<()>

Source

fn upsert_snapshot_chunk_rows( &mut self, table: &str, rows: &SnapshotChunkRows, fallback_version: Option<i64>, ) -> Result<()>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§