pub trait RemoteCacheStore {
// Required methods
fn get_pull_state(&self) -> Result<RemotePullState>;
fn set_pull_state(&self, state: &RemotePullState) -> Result<()>;
fn with_remote_refresh<T>(
&self,
f: impl for<'a> FnOnce(&'a Transaction<'_>) -> Result<T>,
) -> Result<T>;
}Expand description
Read/write remote cache tables and pull cursor. Implemented for Store.
Required Methods§
fn get_pull_state(&self) -> Result<RemotePullState>
Sourcefn set_pull_state(&self, state: &RemotePullState) -> Result<()>
fn set_pull_state(&self, state: &RemotePullState) -> Result<()>
Update cursor and last success time (call only after a successful import in the same txn or immediately after commit).
Sourcefn with_remote_refresh<T>(
&self,
f: impl for<'a> FnOnce(&'a Transaction<'_>) -> Result<T>,
) -> Result<T>
fn with_remote_refresh<T>( &self, f: impl for<'a> FnOnce(&'a Transaction<'_>) -> Result<T>, ) -> Result<T>
Run f inside a transaction (use for clear + bulk insert + cursor update).
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.