Skip to main content

Store

Trait Store 

Source
pub trait Store: Send + Sync {
    type Bucket: Bucket + Send + Sync + 'static;

    // Required methods
    fn get_or_create_bucket<'life0, 'life1, 'async_trait>(
        &'life0 self,
        bucket_name: &'life1 str,
        ttl: Option<Duration>,
    ) -> Pin<Box<dyn Future<Output = Result<Self::Bucket, StoreError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_bucket<'life0, 'life1, 'async_trait>(
        &'life0 self,
        bucket_name: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Option<Self::Bucket>, StoreError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn connection_id(&self) -> u64;
    fn shutdown(&self);
}

Required Associated Types§

Source

type Bucket: Bucket + Send + Sync + 'static

Required Methods§

Source

fn get_or_create_bucket<'life0, 'life1, 'async_trait>( &'life0 self, bucket_name: &'life1 str, ttl: Option<Duration>, ) -> Pin<Box<dyn Future<Output = Result<Self::Bucket, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn get_bucket<'life0, 'life1, 'async_trait>( &'life0 self, bucket_name: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<Self::Bucket>, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn connection_id(&self) -> u64

Source

fn shutdown(&self)

Implementors§

Source§

impl Store for EtcdStore

Source§

type Bucket = EtcdBucket

Source§

impl Store for FileStore

Source§

type Bucket = Directory

Source§

impl Store for MemoryStore

Source§

type Bucket = MemoryBucketRef

Source§

impl Store for NATSStore

Source§

type Bucket = NATSBucket