Trait UploadStrategy

Source
pub trait UploadStrategy {
    // Required methods
    fn upload_layer<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>(
        &'life0 self,
        layer: &'life1 LayerInfo,
        repository: &'life2 str,
        tar_path: &'life3 Path,
        token: &'life4 Option<String>,
        upload_url: &'life5 str,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait,
             'life4: 'async_trait,
             'life5: 'async_trait;
    fn supports_layer(&self, layer: &LayerInfo) -> bool;
    fn name(&self) -> &'static str;
}
Expand description

Common upload strategy trait

Required Methods§

Source

fn upload_layer<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>( &'life0 self, layer: &'life1 LayerInfo, repository: &'life2 str, tar_path: &'life3 Path, token: &'life4 Option<String>, upload_url: &'life5 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait, 'life5: 'async_trait,

Upload a single layer

Source

fn supports_layer(&self, layer: &LayerInfo) -> bool

Check if this strategy supports the given layer

Source

fn name(&self) -> &'static str

Get strategy name for logging

Implementors§