pub struct StorageMigrator<S: BlockStore, D: BlockStore> { /* private fields */ }Expand description
Storage migrator
Implementations§
Source§impl<S: BlockStore, D: BlockStore> StorageMigrator<S, D>
impl<S: BlockStore, D: BlockStore> StorageMigrator<S, D>
Sourcepub fn with_config(
source: Arc<S>,
destination: Arc<D>,
config: MigrationConfig,
) -> Self
pub fn with_config( source: Arc<S>, destination: Arc<D>, config: MigrationConfig, ) -> Self
Create with custom configuration
Sourcepub fn with_progress_callback<F>(self, callback: F) -> Self
pub fn with_progress_callback<F>(self, callback: F) -> Self
Set progress callback
Sourcepub async fn migrate_all(&self) -> Result<MigrationStats>
pub async fn migrate_all(&self) -> Result<MigrationStats>
Migrate all blocks from source to destination
Sourcepub async fn migrate_cids(&self, cids: &[Cid]) -> Result<MigrationStats>
pub async fn migrate_cids(&self, cids: &[Cid]) -> Result<MigrationStats>
Migrate specific CIDs
Auto Trait Implementations§
impl<S, D> Freeze for StorageMigrator<S, D>
impl<S, D> !RefUnwindSafe for StorageMigrator<S, D>
impl<S, D> Send for StorageMigrator<S, D>
impl<S, D> Sync for StorageMigrator<S, D>
impl<S, D> Unpin for StorageMigrator<S, D>
impl<S, D> !UnwindSafe for StorageMigrator<S, D>
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