Skip to main content

WriteLockWithPoisonBehavior

Trait WriteLockWithPoisonBehavior 

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

Required Associated Types§

Source

type Guard<'g> where Self: 'g

Required Methods§

Source

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

Source

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

Source

fn write_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> WriteLockWithPoisonBehavior<T> for Arc<RwLock<T>>
where T: ?Sized,

Source§

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

Source§

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

Source§

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

Source§

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

Implementors§