pub struct Replicator<S: BlockStore, T: BlockStore> { /* private fields */ }Expand description
Block replicator for syncing between stores
Implementations§
Source§impl<S: BlockStore, T: BlockStore> Replicator<S, T>
impl<S: BlockStore, T: BlockStore> Replicator<S, T>
Sourcepub async fn sync(
&self,
strategy: SyncStrategy,
conflict_strategy: Option<ConflictStrategy>,
) -> Result<SyncResult>
pub async fn sync( &self, strategy: SyncStrategy, conflict_strategy: Option<ConflictStrategy>, ) -> Result<SyncResult>
Synchronize blocks from source to target
§Arguments
strategy- Synchronization strategy to useconflict_strategy- How to resolve conflicts (if None, defaults to KeepSource)
Sourcepub fn state(&self) -> ReplicationState
pub fn state(&self) -> ReplicationState
Get current replication state
Sourcepub async fn sync_blocks(
&self,
cids: &[Cid],
conflict_strategy: Option<ConflictStrategy>,
) -> Result<SyncResult>
pub async fn sync_blocks( &self, cids: &[Cid], conflict_strategy: Option<ConflictStrategy>, ) -> Result<SyncResult>
Sync specific blocks by CID list
Auto Trait Implementations§
impl<S, T> !Freeze for Replicator<S, T>
impl<S, T> !RefUnwindSafe for Replicator<S, T>
impl<S, T> Send for Replicator<S, T>
impl<S, T> Sync for Replicator<S, T>
impl<S, T> Unpin for Replicator<S, T>
impl<S, T> UnwindSafe for Replicator<S, T>where
S: RefUnwindSafe,
T: 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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more