Skip to main content

AcquireCrossProcessLockFn

Trait AcquireCrossProcessLockFn 

Source
pub trait AcquireCrossProcessLockFn<L>: AsyncFn(&CrossProcessLock<L>) -> Result<Result<CrossProcessLockState, CrossProcessLockUnobtained>, <L as TryLock>::LockError>
where L: TryLock + Clone + SendOutsideWasm + 'static,
{ }
Expand description

A trait that represents any function which can be used to acquire the underlying lock of a CrossProcessLock.

For example, this can be useful when writing a function which is parameterized to acquire the underlying lock through either CrossProcessLock::spin_lock or CrossProcessLock::try_lock_once.

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§