pub trait LocalStore<T>: Send + Sync {
// Required methods
fn all(&self) -> SyncResult<Vec<T>>;
fn remove(&self, id: &str) -> SyncResult<()>;
fn apply_remote(&self, items: &[T]) -> SyncResult<Vec<ApplyOutcome>>;
}Expand description
The app’s local data. All calls are synchronous.
Required Methods§
fn all(&self) -> SyncResult<Vec<T>>
Sourcefn remove(&self, id: &str) -> SyncResult<()>
fn remove(&self, id: &str) -> SyncResult<()>
Remove a locally held item because of a tombstone. Idempotent.
Sourcefn apply_remote(&self, items: &[T]) -> SyncResult<Vec<ApplyOutcome>>
fn apply_remote(&self, items: &[T]) -> SyncResult<Vec<ApplyOutcome>>
Upsert downloaded items; one outcome per input, in order. Err
aborts the pass WITHOUT advancing the change token.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".