Trait lock_order::lock::UnlockedAccess
source · pub trait UnlockedAccess<A> {
type Data;
type Guard<'l>: Deref<Target = Self::Data>
where Self: 'l;
// Required method
fn access(&self) -> Self::Guard<'_>;
}
Expand description
Describes how to access state in Self
that doesn’t require locking.
UnlockedAccess
allows access to some state in Self
without acquiring
a lock. Unlike Lock
and friends, the type parameter A
in
UnlockedAccess<A>
is used to provide a label for the state; it is
unrelated to the lock levels for Self
.
In order for this crate to provide guarantees about lock ordering safety,
UnlockedAccess
must only be implemented for accessing state that is
guaranteed to be accessible lock-free.
Required Associated Types§
Required Methods§
Object Safety§
This trait is not object safe.