pub struct MemoryLockManager;Expand description
In-process named locks with a process-wide shared keyspace. See the
module docs for the comparison with
[InternalMemoryLockManager].
Implementations§
Trait Implementations§
Source§impl Debug for MemoryLockManager
impl Debug for MemoryLockManager
Source§impl Default for MemoryLockManager
impl Default for MemoryLockManager
Source§impl LockManager for MemoryLockManager
impl LockManager for MemoryLockManager
Source§fn try_lock<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Option<Box<dyn LockGuard>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn try_lock<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Option<Box<dyn LockGuard>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Try to acquire the named lock without waiting. Returns
None if
it is already held, the key is rejected by [validate_key], or
the backend cannot acquire the lock for any other reason.Auto Trait Implementations§
impl Freeze for MemoryLockManager
impl RefUnwindSafe for MemoryLockManager
impl Send for MemoryLockManager
impl Sync for MemoryLockManager
impl Unpin for MemoryLockManager
impl UnsafeUnpin for MemoryLockManager
impl UnwindSafe for MemoryLockManager
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request