Skip to main content

StorageConnection

Trait StorageConnection 

Source
pub trait StorageConnection:
    Send
    + Sync
    + Sized
    + 'static {
    type Config: DeserializeOwned + Send + Sync;

    // Required method
    fn connect<'life0, 'async_trait>(
        config: Self::Config,
        storage_registry: Arc<StorageRegistry>,
        plugin_namespace: &'life0 str,
    ) -> Pin<Box<dyn Future<Output = Result<Self, String>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

The entry point for a generic storage adapter. It guarantees that plugins can seamlessly initialize their underlying connection using the shared StorageRegistry without requiring manual setup in main.rs.

Required Associated Types§

Required Methods§

Source

fn connect<'life0, 'async_trait>( config: Self::Config, storage_registry: Arc<StorageRegistry>, plugin_namespace: &'life0 str, ) -> Pin<Box<dyn Future<Output = Result<Self, String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§