pub trait StorageProviderFactory: Send + Sync {
// Required methods
fn name(&self) -> &str;
fn display_name(&self) -> &str;
fn known_platform(&self) -> Option<StoragePlatform>;
fn create<'life0, 'life1, 'async_trait>(
&'life0 self,
config: &'life1 HashMap<String, String>,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn StorageOps>, StorageError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn validate_config(&self, config: &HashMap<String, String>) -> Vec<String>;
fn required_config_keys(&self) -> Vec<&str>;
}Expand description
Factory that creates storage operation instances from configuration.
Third-party storage backends (e.g., Kafka, HDFS, proprietary systems) implement this trait to integrate with Razeri’s file management.
Required Methods§
Sourcefn display_name(&self) -> &str
fn display_name(&self) -> &str
Human-readable display name.
Sourcefn known_platform(&self) -> Option<StoragePlatform>
fn known_platform(&self) -> Option<StoragePlatform>
Known enum variant, if this is a built-in platform.
Sourcefn create<'life0, 'life1, 'async_trait>(
&'life0 self,
config: &'life1 HashMap<String, String>,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn StorageOps>, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn create<'life0, 'life1, 'async_trait>(
&'life0 self,
config: &'life1 HashMap<String, String>,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn StorageOps>, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Create a storage operations instance from a key-value configuration.
Sourcefn validate_config(&self, config: &HashMap<String, String>) -> Vec<String>
fn validate_config(&self, config: &HashMap<String, String>) -> Vec<String>
Validate configuration without creating a connection.
Sourcefn required_config_keys(&self) -> Vec<&str>
fn required_config_keys(&self) -> Vec<&str>
List required configuration keys.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".