pub type AccessResult<T> = Result<T, AccessError<T>>;Expand description
The result type returned by ThreadCheckedMutex::into_inner or
ThreadCheckedMutex::get_mut.
Aliased Type§
pub enum AccessResult<T> {
Ok(T),
Err(AccessError<T>),
}Variants§
Trait Implementations§
Source§impl<T> HandlePoisonResult for AccessResult<T>
impl<T> HandlePoisonResult for AccessResult<T>
Source§fn ignore_poison(self) -> Self::PoisonlessResult
fn ignore_poison(self) -> Self::PoisonlessResult
Silently converts any poison error into a successful result (see
PoisonError::into_inner), and otherwise returns the result unchanged.
Since every AccessError is caused by poison, the returned result is always Ok.
Source§fn panic_if_poison(self) -> Self::PoisonlessResult
fn panic_if_poison(self) -> Self::PoisonlessResult
Panics if the error was caused by poison, and otherwise returns the error unchanged.
Note that every AccessError is caused by poison, so this is similar to unwrapping the
result.
§Panics
Panics if the result is an Err, which was necessarily caused by poison.
Source§type PoisonlessResult = Result<T, AccessError<Infallible>>
type PoisonlessResult = Result<T, AccessError<Infallible>>
A variation of the
Self result type which cannot possibly be a poison error.