mithril_client::snapshot_downloader

Trait SnapshotDownloader

source
pub trait SnapshotDownloader: Sync + Send {
    // Required methods
    fn download_unpack<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        location: &'life1 str,
        target_dir: &'life2 Path,
        compression_algorithm: CompressionAlgorithm,
        download_id: &'life3 str,
        snapshot_size: u64,
    ) -> Pin<Box<dyn Future<Output = MithrilResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait;
    fn probe<'life0, 'life1, 'async_trait>(
        &'life0 self,
        location: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = MithrilResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

API that defines a snapshot downloader

Required Methods§

source

fn download_unpack<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, location: &'life1 str, target_dir: &'life2 Path, compression_algorithm: CompressionAlgorithm, download_id: &'life3 str, snapshot_size: u64, ) -> Pin<Box<dyn Future<Output = MithrilResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Download and unpack a snapshot archive on the disk.

The download_id is a unique identifier that allow feedback receivers to track concurrent downloads.

Warning: this can be a quite long operation depending on the snapshot size.

source

fn probe<'life0, 'life1, 'async_trait>( &'life0 self, location: &'life1 str, ) -> Pin<Box<dyn Future<Output = MithrilResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Test if the given snapshot location exists.

Implementors§