RepositoryExt

Trait RepositoryExt 

Source
pub trait RepositoryExt: Repository {
    // Required methods
    fn collect_manifests<S>(
        &self,
        manifests: S,
        concurrency: impl Into<Option<usize>>,
    ) -> impl Future<Output = Result<FossilCollection<Self::ManifestID, <Self::Manifest as Manifest>::ChunkID>, FallibleFossilCollectionError<Self::Error, <Self::Manifest as Manifest>::Error, FossilCollectionError<Self::ManifestID, <Self::Manifest as Manifest>::ChunkID, Self::Error>>>>
       where S: IntoIterator,
             S::Item: Borrow<Self::ManifestID> + Eq + Hash;
    fn extensive_collection<S>(
        &self,
        manifests: S,
        concurrency: impl Into<Option<usize>>,
    ) -> impl Future<Output = Result<FossilCollection<Self::ManifestID, <Self::Manifest as Manifest>::ChunkID>, FallibleFossilCollectionError<Self::Error, <Self::Manifest as Manifest>::Error, FossilCollectionError<Self::ManifestID, <Self::Manifest as Manifest>::ChunkID, Self::Error>>>>
       where S: IntoIterator,
             S::Item: Borrow<Self::ManifestID> + Eq + Hash;
}
Expand description

Shortscuts for using FossilCollectionBuilder.

Required Methods§

Source

fn collect_manifests<S>( &self, manifests: S, concurrency: impl Into<Option<usize>>, ) -> impl Future<Output = Result<FossilCollection<Self::ManifestID, <Self::Manifest as Manifest>::ChunkID>, FallibleFossilCollectionError<Self::Error, <Self::Manifest as Manifest>::Error, FossilCollectionError<Self::ManifestID, <Self::Manifest as Manifest>::ChunkID, Self::Error>>>>
where S: IntoIterator, S::Item: Borrow<Self::ManifestID> + Eq + Hash,

Collect chunks of a set of manifest in preparation of their deletion.

This is a shortcut for feeding the chunks of all other manifests to FossilCollectionBuilder::add_referenced_chunk while feeding the chunks of the passed manifests to FossilCollectionBuilder::add_fossil_candidate followed by calling FossilCollectionBuilder::collect_fossils.

Source

fn extensive_collection<S>( &self, manifests: S, concurrency: impl Into<Option<usize>>, ) -> impl Future<Output = Result<FossilCollection<Self::ManifestID, <Self::Manifest as Manifest>::ChunkID>, FallibleFossilCollectionError<Self::Error, <Self::Manifest as Manifest>::Error, FossilCollectionError<Self::ManifestID, <Self::Manifest as Manifest>::ChunkID, Self::Error>>>>
where S: IntoIterator, S::Item: Borrow<Self::ManifestID> + Eq + Hash,

Perform an extensive fossil collection, additionally removing unreferenced chunks and existing fossils from the repository.

This combines RepositoryExt::collect_manifests with FossilCollectionBuilder::consider_all_chunks and FossilCollectionBuilder::collect_all_fossils.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T> RepositoryExt for T
where T: Repository + ?Sized, T::ManifestID: Eq + Hash, <T::Manifest as Manifest>::ChunkID: Eq + Hash, <T::Manifest as Manifest>::ClientID: Eq + Hash,