Skip to main content

ReadLockWithPoisonBehavior

Trait ReadLockWithPoisonBehavior 

Source
pub trait ReadLockWithPoisonBehavior<T>
where T: ?Sized,
{ type Guard<'g> where Self: 'g; // Required methods fn read_lock_with_poison_behavior<F>( &self, if_poisoned: F, ) -> Self::Guard<'_> where F: FnOnce(&mut Self::Guard<'_>), T: 'static; fn read_lock_ignore_poison(&self) -> Self::Guard<'_>; fn read_lock_clear_poison(&self) -> Self::Guard<'_>; }

Required Associated Types§

Source

type Guard<'g> where Self: 'g

Required Methods§

Source

fn read_lock_with_poison_behavior<F>(&self, if_poisoned: F) -> Self::Guard<'_>
where F: FnOnce(&mut Self::Guard<'_>), T: 'static,

Source

fn read_lock_ignore_poison(&self) -> Self::Guard<'_>

Source

fn read_lock_clear_poison(&self) -> Self::Guard<'_>

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.

Implementations on Foreign Types§

Source§

impl<T> ReadLockWithPoisonBehavior<T> for Arc<RwLock<T>>
where T: ?Sized,

Source§

type Guard<'g> = RwLockReadGuard<'g, T> where Arc<RwLock<T>>: 'g

Source§

fn read_lock_with_poison_behavior<F>( &self, if_poisoned: F, ) -> <Arc<RwLock<T>> as ReadLockWithPoisonBehavior<T>>::Guard<'_>
where F: FnOnce(&mut <Arc<RwLock<T>> as ReadLockWithPoisonBehavior<T>>::Guard<'_>), T: 'static,

Source§

fn read_lock_ignore_poison( &self, ) -> <Arc<RwLock<T>> as ReadLockWithPoisonBehavior<T>>::Guard<'_>

Source§

fn read_lock_clear_poison( &self, ) -> <Arc<RwLock<T>> as ReadLockWithPoisonBehavior<T>>::Guard<'_>

Implementors§