Trait matrix_sdk_base::store_locks::BackingStore

source ·
pub trait BackingStore {
    type Error: Error + Send + Sync;

    // Required method
    fn try_lock<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        lease_duration_ms: u32,
        key: &'life1 str,
        holder: &'life2 str,
    ) -> Pin<Box<dyn Future<Output = Result<bool, Self::Error>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             Self: 'async_trait;
}
Expand description

Backing store for a cross-process lock.

Required Associated Types§

Required Methods§

source

fn try_lock<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, lease_duration_ms: u32, key: &'life1 str, holder: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<bool, Self::Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, Self: 'async_trait,

Try to take a lock using the given store.

Implementations on Foreign Types§

source§

impl BackingStore for LockableCryptoStore

§

type Error = CryptoStoreError

source§

fn try_lock<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, lease_duration_ms: u32, key: &'life1 str, holder: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<bool, <LockableCryptoStore as BackingStore>::Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, LockableCryptoStore: 'async_trait,

Implementors§