pub trait CloudStorage: Send + Sync {
Show 14 methods
// Required methods
fn get_object<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, CloudError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn put_object<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
key: &'life1 str,
data: &'life2 [u8],
) -> Pin<Box<dyn Future<Output = Result<(), CloudError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait;
fn delete_object<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), CloudError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn list_objects<'life0, 'life1, 'async_trait>(
&'life0 self,
prefix: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, CloudError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn get_object_metadata<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<ObjectMetadata, CloudError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
// Provided methods
fn get_object_with_options<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
key: &'life1 str,
options: &'life2 GetObjectOptions,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, CloudError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait { ... }
fn put_object_with_options<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
key: &'life1 str,
data: &'life2 [u8],
options: &'life3 PutObjectOptions,
) -> Pin<Box<dyn Future<Output = Result<(), CloudError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait { ... }
fn list_objects_with_limit<'life0, 'life1, 'async_trait>(
&'life0 self,
prefix: &'life1 str,
max_results: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, CloudError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait { ... }
fn object_exists<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool, CloudError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait { ... }
fn copy_object<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
from_key: &'life1 str,
to_key: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), CloudError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait { ... }
fn move_object<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
from_key: &'life1 str,
to_key: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), CloudError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait { ... }
fn provider_name(&self) -> &str { ... }
fn delete_objects<'life0, 'life1, 'async_trait>(
&'life0 self,
keys: &'life1 [String],
) -> Pin<Box<dyn Future<Output = Result<(), CloudError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait { ... }
fn list_objects_with_metadata<'life0, 'life1, 'async_trait>(
&'life0 self,
prefix: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<ObjectMetadata>, CloudError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait { ... }
}Expand description
Unified trait for cloud object storage.
This trait provides a consistent interface for object storage operations across different cloud providers (AWS S3, GCP Cloud Storage, Azure Blob Storage).
Required Methods§
Sourcefn get_object<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, CloudError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn get_object<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, CloudError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Sourcefn put_object<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
key: &'life1 str,
data: &'life2 [u8],
) -> Pin<Box<dyn Future<Output = Result<(), CloudError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn put_object<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
key: &'life1 str,
data: &'life2 [u8],
) -> Pin<Box<dyn Future<Output = Result<(), CloudError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Sourcefn delete_object<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), CloudError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn delete_object<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), CloudError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Sourcefn list_objects<'life0, 'life1, 'async_trait>(
&'life0 self,
prefix: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, CloudError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn list_objects<'life0, 'life1, 'async_trait>(
&'life0 self,
prefix: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, CloudError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Sourcefn get_object_metadata<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<ObjectMetadata, CloudError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn get_object_metadata<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<ObjectMetadata, CloudError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Provided Methods§
Sourcefn get_object_with_options<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
key: &'life1 str,
options: &'life2 GetObjectOptions,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, CloudError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn get_object_with_options<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
key: &'life1 str,
options: &'life2 GetObjectOptions,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, CloudError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Sourcefn put_object_with_options<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
key: &'life1 str,
data: &'life2 [u8],
options: &'life3 PutObjectOptions,
) -> Pin<Box<dyn Future<Output = Result<(), CloudError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
fn put_object_with_options<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
key: &'life1 str,
data: &'life2 [u8],
options: &'life3 PutObjectOptions,
) -> Pin<Box<dyn Future<Output = Result<(), CloudError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
Sourcefn list_objects_with_limit<'life0, 'life1, 'async_trait>(
&'life0 self,
prefix: &'life1 str,
max_results: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, CloudError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn list_objects_with_limit<'life0, 'life1, 'async_trait>(
&'life0 self,
prefix: &'life1 str,
max_results: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, CloudError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Sourcefn object_exists<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool, CloudError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn object_exists<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool, CloudError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Sourcefn copy_object<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
from_key: &'life1 str,
to_key: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), CloudError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn copy_object<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
from_key: &'life1 str,
to_key: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), CloudError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Sourcefn move_object<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
from_key: &'life1 str,
to_key: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), CloudError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn move_object<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
from_key: &'life1 str,
to_key: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), CloudError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Sourcefn provider_name(&self) -> &str
fn provider_name(&self) -> &str
Gets the storage provider name (e.g., “s3”, “gcs”, “azure”).