pub trait Lockable {
type GuardMut<'a>
where Self: 'a;
// Required methods
fn lock(&self) -> Self::GuardMut<'_>;
fn try_lock(&self) -> Option<Self::GuardMut<'_>>;
fn unlock(guard: Self::GuardMut<'_>) -> &Self;
}Expand description
Any mutex object should implement this trait
Required Associated Types§
Required Methods§
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.