pub trait RwLockExt {
type ReadGuard<'a>
where Self: 'a;
type WriteGuard<'a>
where Self: 'a;
// Required methods
fn read_or_poisoned(&self) -> Self::ReadGuard<'_>;
fn write_or_poisoned(&self) -> Self::WriteGuard<'_>;
}Expand description
Extension methods for read-write locks that should panic when poisoned.
Required Associated Types§
Sourcetype ReadGuard<'a>
where
Self: 'a
type ReadGuard<'a> where Self: 'a
Guard returned by RwLockExt::read_or_poisoned.
Sourcetype WriteGuard<'a>
where
Self: 'a
type WriteGuard<'a> where Self: 'a
Guard returned by RwLockExt::write_or_poisoned.
Required Methods§
Sourcefn read_or_poisoned(&self) -> Self::ReadGuard<'_>
fn read_or_poisoned(&self) -> Self::ReadGuard<'_>
Acquire a read guard, preserving the existing panic-on-poison behavior.
Sourcefn write_or_poisoned(&self) -> Self::WriteGuard<'_>
fn write_or_poisoned(&self) -> Self::WriteGuard<'_>
Acquire a write guard, preserving the existing panic-on-poison behavior.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".