pub struct SyncManager<S>where
S: CheckpointStore,{ /* private fields */ }Expand description
Manager for handling sync operations with checkpoint tracking.
The SyncManager is generic over the checkpoint store type S,
providing storage-agnostic checkpoint management.
Implementations§
Source§impl<S> SyncManager<S>where
S: CheckpointStore,
impl<S> SyncManager<S>where
S: CheckpointStore,
Sourcepub fn new(store: S) -> SyncManager<S>
pub fn new(store: S) -> SyncManager<S>
Create a new sync manager with the given store.
By default, checkpoint emission is enabled.
Sourcepub fn new_without_emit(store: S) -> SyncManager<S>
pub fn new_without_emit(store: S) -> SyncManager<S>
Create a new sync manager with checkpoint emission disabled.
Sourcepub fn with_emit_checkpoints(self, emit: bool) -> SyncManager<S>
pub fn with_emit_checkpoints(self, emit: bool) -> SyncManager<S>
Set whether to emit checkpoints.
Sourcepub fn emit_checkpoints(&self) -> bool
pub fn emit_checkpoints(&self) -> bool
Check if checkpoint emission is enabled.
Sourcepub async fn emit_checkpoint<C>(
&self,
checkpoint: &C,
phase: SyncPhase,
) -> Result<(), Error>where
C: Checkpoint,
pub async fn emit_checkpoint<C>(
&self,
checkpoint: &C,
phase: SyncPhase,
) -> Result<(), Error>where
C: Checkpoint,
Emit checkpoint for any database-specific checkpoint type.
Sourcepub async fn read_checkpoint<C>(&self, phase: SyncPhase) -> Result<C, Error>where
C: Checkpoint,
pub async fn read_checkpoint<C>(&self, phase: SyncPhase) -> Result<C, Error>where
C: Checkpoint,
Read and parse checkpoint into database-specific type.
Source§impl SyncManager<NullStore>
impl SyncManager<NullStore>
Sourcepub fn disabled() -> SyncManager<NullStore>
pub fn disabled() -> SyncManager<NullStore>
Create a sync manager that does nothing (for disabled checkpoint storage).
Auto Trait Implementations§
impl<S> Freeze for SyncManager<S>where
S: Freeze,
impl<S> RefUnwindSafe for SyncManager<S>where
S: RefUnwindSafe,
impl<S> Send for SyncManager<S>
impl<S> Sync for SyncManager<S>
impl<S> Unpin for SyncManager<S>where
S: Unpin,
impl<S> UnsafeUnpin for SyncManager<S>where
S: UnsafeUnpin,
impl<S> UnwindSafe for SyncManager<S>where
S: UnwindSafe,
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