pub trait Lock:
Send
+ Sync
+ Default {
type Guard;
type ReadGuard;
// Required methods
fn lock_owned(self: Arc<Self>) -> Self::Guard;
fn try_lock_owned(self: Arc<Self>) -> Option<Self::Guard>;
fn read_lock_owned(self: Arc<Self>) -> Self::ReadGuard;
}
Required Associated Types§
Required Methods§
fn lock_owned(self: Arc<Self>) -> Self::Guard
fn try_lock_owned(self: Arc<Self>) -> Option<Self::Guard>
fn read_lock_owned(self: Arc<Self>) -> Self::ReadGuard
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.