[−][src]Trait asuran::manifest::driver::BackupDriver
Defines a type that can, semi-automatically, drive the storage of objects from
an associated BackupTarget
into a repository.
As this is effectively an extension trait for a BackupTarget
, and the behavior
will usually be more or less the same, reasonable default implementations have
been provided.
Provided methods
#[must_use]fn raw_store_object<'life0, 'life1, 'life2, 'async_trait, B: BackendClone, C: AsyncChunker + Send + 'static>(
&'life0 self,
repo: &'life1 mut Repository<B>,
chunker: C,
archive: &'life2 ActiveArchive,
node: Node,
objects: HashMap<String, BackupObject<T>>
) -> Pin<Box<dyn Future<Output = Result<(), DriverError>> + Send + 'async_trait>> where
B: 'async_trait,
C: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: Sync + 'async_trait,
&'life0 self,
repo: &'life1 mut Repository<B>,
chunker: C,
archive: &'life2 ActiveArchive,
node: Node,
objects: HashMap<String, BackupObject<T>>
) -> Pin<Box<dyn Future<Output = Result<(), DriverError>> + Send + 'async_trait>> where
B: 'async_trait,
C: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: Sync + 'async_trait,
Inserts an object into the repository using the output from
BackupTarget::backup_object
This method should only be used directly when you want to modify the data in
route, otherwise use store_object
.
Stores objects in sub-namespaces of the namespace of the archive object provided
#[must_use]fn store_object<'life0, 'life1, 'life2, 'async_trait, B: BackendClone, C: AsyncChunker + Send + 'static>(
&'life0 self,
repo: &'life1 mut Repository<B>,
chunker: C,
archive: &'life2 ActiveArchive,
node: Node
) -> Pin<Box<dyn Future<Output = Result<(), DriverError>> + Send + 'async_trait>> where
B: 'async_trait,
C: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: Sync + 'async_trait,
&'life0 self,
repo: &'life1 mut Repository<B>,
chunker: C,
archive: &'life2 ActiveArchive,
node: Node
) -> Pin<Box<dyn Future<Output = Result<(), DriverError>> + Send + 'async_trait>> where
B: 'async_trait,
C: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: Sync + 'async_trait,
Convenience method that performs a call to self.backup_object
for you and
routes the results into self.raw_store_object