Skip to main content

StorageManager

Trait StorageManager 

Source
pub trait StorageManager: Send + Sync {
    // Required methods
    fn create_bucket<'life0, 'life1, 'async_trait>(
        &'life0 self,
        bucket_name: &'life1 str,
        config: Option<BucketConfig>,
    ) -> Pin<Box<dyn Future<Output = StorageResult<bool>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn delete_bucket<'life0, 'life1, 'async_trait>(
        &'life0 self,
        bucket_name: &'life1 str,
        force: bool,
    ) -> Pin<Box<dyn Future<Output = StorageResult<bool>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn list_buckets<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = StorageResult<Vec<String>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_bucket_info<'life0, 'life1, 'async_trait>(
        &'life0 self,
        bucket_name: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = StorageResult<BucketInfo>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn set_lifecycle_rules<'life0, 'life1, 'async_trait>(
        &'life0 self,
        bucket_name: &'life1 str,
        rules: Vec<LifecycleRule>,
    ) -> Pin<Box<dyn Future<Output = StorageResult<bool>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn enable_versioning<'life0, 'life1, 'async_trait>(
        &'life0 self,
        bucket_name: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = StorageResult<bool>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn disable_versioning<'life0, 'life1, 'async_trait>(
        &'life0 self,
        bucket_name: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = StorageResult<bool>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn set_access_control<'life0, 'life1, 'async_trait>(
        &'life0 self,
        bucket_name: &'life1 str,
        policy: AccessPolicy,
    ) -> Pin<Box<dyn Future<Output = StorageResult<bool>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_access_control<'life0, 'life1, 'async_trait>(
        &'life0 self,
        bucket_name: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = StorageResult<AccessPolicy>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn restore_backup<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        backup_path: &'life1 str,
        target_bucket: &'life2 str,
        target_prefix: Option<String>,
    ) -> Pin<Box<dyn Future<Output = StorageResult<RestoreResult>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn create_backup<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        bucket_name: &'life1 str,
        backup_path: &'life2 str,
        prefix_filter: Option<String>,
    ) -> Pin<Box<dyn Future<Output = StorageResult<BackupResult>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
}
Expand description

Storage management trait for administrative operations

Required Methods§

Source

fn create_bucket<'life0, 'life1, 'async_trait>( &'life0 self, bucket_name: &'life1 str, config: Option<BucketConfig>, ) -> Pin<Box<dyn Future<Output = StorageResult<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Create a new bucket/container

Source

fn delete_bucket<'life0, 'life1, 'async_trait>( &'life0 self, bucket_name: &'life1 str, force: bool, ) -> Pin<Box<dyn Future<Output = StorageResult<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Delete a bucket/container

Source

fn list_buckets<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = StorageResult<Vec<String>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

List all buckets/containers

Source

fn get_bucket_info<'life0, 'life1, 'async_trait>( &'life0 self, bucket_name: &'life1 str, ) -> Pin<Box<dyn Future<Output = StorageResult<BucketInfo>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get bucket/container information

Source

fn set_lifecycle_rules<'life0, 'life1, 'async_trait>( &'life0 self, bucket_name: &'life1 str, rules: Vec<LifecycleRule>, ) -> Pin<Box<dyn Future<Output = StorageResult<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Set bucket lifecycle rules

Source

fn enable_versioning<'life0, 'life1, 'async_trait>( &'life0 self, bucket_name: &'life1 str, ) -> Pin<Box<dyn Future<Output = StorageResult<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Enable bucket versioning

Source

fn disable_versioning<'life0, 'life1, 'async_trait>( &'life0 self, bucket_name: &'life1 str, ) -> Pin<Box<dyn Future<Output = StorageResult<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Disable bucket versioning

Source

fn set_access_control<'life0, 'life1, 'async_trait>( &'life0 self, bucket_name: &'life1 str, policy: AccessPolicy, ) -> Pin<Box<dyn Future<Output = StorageResult<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Set bucket access control

Source

fn get_access_control<'life0, 'life1, 'async_trait>( &'life0 self, bucket_name: &'life1 str, ) -> Pin<Box<dyn Future<Output = StorageResult<AccessPolicy>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get bucket access control

Source

fn restore_backup<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, backup_path: &'life1 str, target_bucket: &'life2 str, target_prefix: Option<String>, ) -> Pin<Box<dyn Future<Output = StorageResult<RestoreResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Restore from backup

Source

fn create_backup<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, bucket_name: &'life1 str, backup_path: &'life2 str, prefix_filter: Option<String>, ) -> Pin<Box<dyn Future<Output = StorageResult<BackupResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Create backup

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§