pub struct SyncEngine<M: RecordMapper> { /* private fields */ }Implementations§
Source§impl<M: RecordMapper + 'static> SyncEngine<M>where
M::Item: 'static,
impl<M: RecordMapper + 'static> SyncEngine<M>where
M::Item: 'static,
pub fn ledger(&self) -> &Ledger
Sourcepub fn note_changed(&mut self, id: &str) -> SyncResult<()>
pub fn note_changed(&mut self, id: &str) -> SyncResult<()>
Offline queue: record that id changed locally. Durable immediately.
Sourcepub fn note_deleted(&mut self, id: &str) -> SyncResult<()>
pub fn note_deleted(&mut self, id: &str) -> SyncResult<()>
Local deletion: block the id and queue a tombstone write. Durable.
Sourcepub fn request_full_replay_once(&mut self, flag: &str)
pub fn request_full_replay_once(&mut self, flag: &str)
Replay the whole zone once for flag (one-shot repair migrations).
Sourcepub fn run_pass(&mut self) -> PassReport
pub fn run_pass(&mut self) -> PassReport
Runs one sync pass and records it in SyncEngine::metrics.
Sourcepub fn status(&self) -> SyncStatus
pub fn status(&self) -> SyncStatus
Pass counters, ledger queue sizes and process resource usage, read now. No polling thread runs for this.
Sourcepub fn metrics(&self) -> SyncMetrics
pub fn metrics(&self) -> SyncMetrics
Cumulative pass counters and current ledger queue sizes.
Auto Trait Implementations§
impl<M> !RefUnwindSafe for SyncEngine<M>
impl<M> !UnwindSafe for SyncEngine<M>
impl<M> Freeze for SyncEngine<M>where
Arc<M>: Freeze,
Arc<dyn LocalStore<<M as RecordMapper>::Item>>: Freeze,
Box<dyn ConflictPolicy<<M as RecordMapper>::Item>>: Freeze,
impl<M> Send for SyncEngine<M>where
Arc<M>: Send,
Arc<dyn LocalStore<<M as RecordMapper>::Item>>: Send,
Box<dyn ConflictPolicy<<M as RecordMapper>::Item>>: Send,
impl<M> Sync for SyncEngine<M>where
Arc<M>: Sync,
Arc<dyn LocalStore<<M as RecordMapper>::Item>>: Sync,
Box<dyn ConflictPolicy<<M as RecordMapper>::Item>>: Sync,
impl<M> Unpin for SyncEngine<M>where
Arc<M>: Unpin,
Arc<dyn LocalStore<<M as RecordMapper>::Item>>: Unpin,
Box<dyn ConflictPolicy<<M as RecordMapper>::Item>>: Unpin,
impl<M> UnsafeUnpin for SyncEngine<M>where
Arc<M>: UnsafeUnpin,
Arc<dyn LocalStore<<M as RecordMapper>::Item>>: UnsafeUnpin,
Box<dyn ConflictPolicy<<M as RecordMapper>::Item>>: UnsafeUnpin,
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