Trait asuran::manifest::driver::BackupDriver [−][src]
pub trait BackupDriver<T: Read + Send + 'static>: BackupTarget<T> {
fn raw_store_object<'life0, 'life1, 'life2, 'life3, 'life4, '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>>,
ex: &'life3 Executor<'life4>
) -> 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,
'life3: 'async_trait,
'life4: 'async_trait,
Self: Sync + 'async_trait,
{ ... }
fn store_object<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait, B: BackendClone, C: AsyncChunker + Send + 'static>(
&'life0 self,
repo: &'life1 mut Repository<B>,
chunker: C,
archive: &'life2 ActiveArchive,
node: Node,
ex: &'life3 Executor<'life4>
) -> 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,
'life3: 'async_trait,
'life4: 'async_trait,
Self: Sync + 'async_trait,
{ ... }
}
Expand description
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
fn raw_store_object<'life0, 'life1, 'life2, 'life3, 'life4, '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>>,
ex: &'life3 Executor<'life4>
) -> 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,
'life3: 'async_trait,
'life4: 'async_trait,
Self: Sync + 'async_trait,
fn raw_store_object<'life0, 'life1, 'life2, 'life3, 'life4, '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>>,
ex: &'life3 Executor<'life4>
) -> 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,
'life3: 'async_trait,
'life4: '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
fn store_object<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait, B: BackendClone, C: AsyncChunker + Send + 'static>(
&'life0 self,
repo: &'life1 mut Repository<B>,
chunker: C,
archive: &'life2 ActiveArchive,
node: Node,
ex: &'life3 Executor<'life4>
) -> 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,
'life3: 'async_trait,
'life4: 'async_trait,
Self: Sync + 'async_trait,
fn store_object<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait, B: BackendClone, C: AsyncChunker + Send + 'static>(
&'life0 self,
repo: &'life1 mut Repository<B>,
chunker: C,
archive: &'life2 ActiveArchive,
node: Node,
ex: &'life3 Executor<'life4>
) -> 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,
'life3: 'async_trait,
'life4: '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