Trait BackingStore

Source
pub trait BackingStore {
    type LockError: Error + Send + Sync;

    // Required method
    fn try_lock(
        &self,
        lease_duration_ms: u32,
        key: &str,
        holder: &str,
    ) -> impl Future<Output = Result<bool, Self::LockError>> + SendOutsideWasm;
}
Expand description

Backing store for a cross-process lock.

Required Associated Types§

Required Methods§

Source

fn try_lock( &self, lease_duration_ms: u32, key: &str, holder: &str, ) -> impl Future<Output = Result<bool, Self::LockError>> + SendOutsideWasm

Try to take a lock using the given store.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§