Trait matrix_sdk::store_locks::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§
sourcefn 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,
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.