Skip to main content

Storage

Trait Storage 

Source
pub trait Storage: Binding + ObjectStore {
    // Required methods
    fn get_base_dir(&self) -> Path;
    fn get_url(&self) -> Url;
    fn presigned_put<'life0, 'life1, 'async_trait>(
        &'life0 self,
        path: &'life1 Path,
        expires_in: Duration,
    ) -> Pin<Box<dyn Future<Output = Result<PresignedRequest>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn presigned_get<'life0, 'life1, 'async_trait>(
        &'life0 self,
        path: &'life1 Path,
        expires_in: Duration,
    ) -> Pin<Box<dyn Future<Output = Result<PresignedRequest>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn presigned_delete<'life0, 'life1, 'async_trait>(
        &'life0 self,
        path: &'life1 Path,
        expires_in: Duration,
    ) -> Pin<Box<dyn Future<Output = Result<PresignedRequest>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

A storage binding that provides object store capabilities.

Required Methods§

Source

fn get_base_dir(&self) -> Path

Gets the base directory path configured for this storage binding.

Source

fn get_url(&self) -> Url

Gets the underlying URL configured for this storage binding.

Source

fn presigned_put<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 Path, expires_in: Duration, ) -> Pin<Box<dyn Future<Output = Result<PresignedRequest>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Creates a presigned request for uploading data to the specified path. The request can be serialized, stored, and executed later.

Source

fn presigned_get<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 Path, expires_in: Duration, ) -> Pin<Box<dyn Future<Output = Result<PresignedRequest>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Creates a presigned request for downloading data from the specified path. The request can be serialized, stored, and executed later.

Source

fn presigned_delete<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 Path, expires_in: Duration, ) -> Pin<Box<dyn Future<Output = Result<PresignedRequest>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Creates a presigned request for deleting the object at the specified path. The request can be serialized, stored, and executed later.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§