pub struct SyncEngine<T: SyncTransport, A: SyncApplier> { /* private fields */ }Expand description
The sync engine manages synchronization with a remote server.
Implementations§
Source§impl<T: SyncTransport, A: SyncApplier> SyncEngine<T, A>
impl<T: SyncTransport, A: SyncApplier> SyncEngine<T, A>
Sourcepub fn new(config: SyncConfig, transport: T, applier: A) -> Self
pub fn new(config: SyncConfig, transport: T, applier: A) -> Self
Creates a new sync engine.
Sourcepub fn set_conflict_policy(&self, policy: ConflictPolicy)
pub fn set_conflict_policy(&self, policy: ConflictPolicy)
Sets the conflict policy.
Sourcepub fn conflict_policy(&self) -> ConflictPolicy
pub fn conflict_policy(&self) -> ConflictPolicy
Gets the conflict policy.
Sourcepub fn reset_cancel(&self)
pub fn reset_cancel(&self)
Resets the cancelled flag.
Sourcepub fn sync(&self) -> SyncResult<SyncCycleResult>
pub fn sync(&self) -> SyncResult<SyncCycleResult>
Performs a full sync cycle: pull then push.
Sourcepub fn sync_with_retry(&self) -> SyncResult<SyncCycleResult>
pub fn sync_with_retry(&self) -> SyncResult<SyncCycleResult>
Performs a sync with retry on transient errors.
Auto Trait Implementations§
impl<T, A> !Freeze for SyncEngine<T, A>
impl<T, A> !RefUnwindSafe for SyncEngine<T, A>
impl<T, A> Send for SyncEngine<T, A>
impl<T, A> Sync for SyncEngine<T, A>
impl<T, A> Unpin for SyncEngine<T, A>
impl<T, A> UnwindSafe for SyncEngine<T, A>where
T: RefUnwindSafe,
A: RefUnwindSafe,
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