pub trait RwLockLike {
type ReadGuard<'a>
where Self: 'a;
type WriteGuard<'a>
where Self: 'a;
type Context;
// Required methods
fn context() -> Self::Context;
fn read(&self, context: &mut Self::Context) -> Self::ReadGuard<'_>;
fn write(&self, context: &mut Self::Context) -> Self::WriteGuard<'_>;
// Provided method
fn key(&self) -> *const ()
where Self: Sized { ... }
}Expand description
A generic rwlock for the ordered_lock operations.
Required Associated Types§
Required Methods§
fn context() -> Self::Context
fn read(&self, context: &mut Self::Context) -> Self::ReadGuard<'_>
fn write(&self, context: &mut Self::Context) -> Self::WriteGuard<'_>
Provided 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.