matrix_sdk_base::store_locks

Trait BackingStore

Source
pub trait BackingStore {
    type LockError: 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::LockError>> + 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::LockError>> + 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

Source§

type LockError = 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>::LockError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, LockableCryptoStore: 'async_trait,

Implementors§