pub struct PoisonError<K, G> {
pub key: K,
/* private fields */
}Expand description
A type of error which can be returned whenever a lock is acquired.
A lock is poisoned whenever a thread panics while a lock is held.
Fields§
§key: KThe key of the lock that was attempted to become locked
Trait Implementations§
Source§impl<K: Clone, G: Clone> Clone for PoisonError<K, G>
impl<K: Clone, G: Clone> Clone for PoisonError<K, G>
Source§fn clone(&self) -> PoisonError<K, G>
fn clone(&self) -> PoisonError<K, G>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<K, G> Display for PoisonError<K, G>where
K: Debug,
impl<K, G> Display for PoisonError<K, G>where
K: Debug,
Source§impl<K, G> Error for PoisonError<K, G>
impl<K, G> Error for PoisonError<K, G>
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
impl<K: Copy, G: Copy> Copy for PoisonError<K, G>
impl<K: Eq, G: Eq> Eq for PoisonError<K, G>
impl<K, G> StructuralPartialEq for PoisonError<K, G>
Auto Trait Implementations§
impl<K, G> Freeze for PoisonError<K, G>
impl<K, G> RefUnwindSafe for PoisonError<K, G>where
K: RefUnwindSafe,
G: RefUnwindSafe,
impl<K, G> Send for PoisonError<K, G>
impl<K, G> Sync for PoisonError<K, G>
impl<K, G> Unpin for PoisonError<K, G>
impl<K, G> UnwindSafe for PoisonError<K, G>where
K: UnwindSafe,
G: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more