pub trait StorageBackend: Send + Sync {
// Required methods
fn list_objects(
&self,
bucket: &str,
prefix: &str,
) -> Pin<Box<dyn Future<Output = Result<Vec<ObjectInfo>, StorageError>> + Send + '_>>;
fn list_prefixes(
&self,
bucket: &str,
prefix: &str,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, StorageError>> + Send + '_>>;
fn get_object(
&self,
bucket: &str,
key: &str,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, StorageError>> + Send + '_>>;
}Expand description
Abstraction over trace storage (S3, local FS, etc.)
Required Methods§
fn list_objects( &self, bucket: &str, prefix: &str, ) -> Pin<Box<dyn Future<Output = Result<Vec<ObjectInfo>, StorageError>> + Send + '_>>
Sourcefn list_prefixes(
&self,
bucket: &str,
prefix: &str,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, StorageError>> + Send + '_>>
fn list_prefixes( &self, bucket: &str, prefix: &str, ) -> Pin<Box<dyn Future<Output = Result<Vec<String>, StorageError>> + Send + '_>>
List immediate child prefixes under prefix using delimiter-based listing.
fn get_object( &self, bucket: &str, key: &str, ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, StorageError>> + Send + '_>>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".