Skip to main content

StoreManager

Trait StoreManager 

Source
pub trait StoreManager: Sync + Send {
    // Required methods
    fn get<'life0, 'life1, 'async_trait>(
        &'life0 self,
        name: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Arc<dyn Store>, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn is_defined(&self, store_name: &str) -> bool;

    // Provided methods
    fn summary(&self, store_name: &str) -> Option<String> { ... }
    fn metadata(&self) -> Arc<dyn Any>  { ... }
}

Required Methods§

Source

fn get<'life0, 'life1, 'async_trait>( &'life0 self, name: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Arc<dyn Store>, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn is_defined(&self, store_name: &str) -> bool

Provided Methods§

Source

fn summary(&self, store_name: &str) -> Option<String>

A human-readable summary of the given store’s configuration

Example: “Redis at localhost:1234”

Source

fn metadata(&self) -> Arc<dyn Any>

Metadata about the store manager that can be accessed for data collection or debugging purposes. This is opaque and can be in any format the store manager chooses.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§