Trait asuran::manifest::destination::RestoreTarget[][src]

pub trait RestoreTarget<T: Write>: Clone + Send + Sync {
    fn load_listing<'life0, 'async_trait>(
        root_path: &'life0 str,
        listing: Listing
    ) -> Pin<Box<dyn Future<Output = Self> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
fn restore_listing<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Listing> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
fn restore_object<'life0, 'async_trait>(
        &'life0 self,
        path: Node
    ) -> Pin<Box<dyn Future<Output = HashMap<String, RestoreObject<T>>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
; }
Expand description

Collection of methods that a restore target has to implement in order for a generic restore driver to be able to load and properly restore its objects from a repository.

As the work of restoring an archive should be split among serveral threads, it is important that targets be thread-aware and thread safe.Into

Required methods

Loads an object listing and creates a new restore target from it

Returns a copy of the internal listing object

This should almost always be a clone of the object you fed into load_listing

Takes an object path

Returns a hashmap, keyed by namespace, of the various parts of this object

Implementors