Skip to main content

Storage

Trait Storage 

Source
pub trait Storage:
    Send
    + Sync
    + Debug {
    // Required methods
    fn upload<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        local: &'life1 Path,
        dest: &'life2 Url,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn download<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        src: &'life1 Url,
        local: &'life2 Path,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn exists<'life0, 'life1, 'async_trait>(
        &'life0 self,
        uri: &'life1 Url,
    ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn delete<'life0, 'life1, 'async_trait>(
        &'life0 self,
        uri: &'life1 Url,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn read_file<'life0, 'life1, 'async_trait>(
        &'life0 self,
        uri: &'life1 Url,
    ) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn glob<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        base: &'life1 Url,
        pattern: &'life2 str,
    ) -> Pin<Box<dyn Future<Output = Result<Box<dyn Iterator<Item = StoragePath> + Send>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
}

Required Methods§

Source

fn upload<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, local: &'life1 Path, dest: &'life2 Url, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source

fn download<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, src: &'life1 Url, local: &'life2 Path, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source

fn exists<'life0, 'life1, 'async_trait>( &'life0 self, uri: &'life1 Url, ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn delete<'life0, 'life1, 'async_trait>( &'life0 self, uri: &'life1 Url, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn read_file<'life0, 'life1, 'async_trait>( &'life0 self, uri: &'life1 Url, ) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn glob<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, base: &'life1 Url, pattern: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<Box<dyn Iterator<Item = StoragePath> + Send>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§