Trait matrix_sdk_common::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 Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: '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 Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Try to take a lock using the given store.

Implementors§