LockResult

Type Alias LockResult 

Source
pub type LockResult<T> = Result<T, LockError<T>>;
Expand description

The result type returned by ThreadCheckedMutex::lock.

Aliased Type§

pub enum LockResult<T> {
    Ok(T),
    Err(LockError<T>),
}

Variants§

§1.0.0

Ok(T)

Contains the success value

§1.0.0

Err(LockError<T>)

Contains the error value

Trait Implementations§

Source§

impl<T> HandlePoisonResult for LockResult<T>

Source§

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.

Read more about poison.

Source§

fn panic_if_poison(self) -> Self::PoisonlessResult

Panics if the result was caused by poison, and otherwise returns the result unchanged.

§Panics

Panics if the result is an Err that was caused by poison.

Read more about poison.

Source§

type PoisonlessResult = Result<T, LockError<Infallible>>

A variation of the Self result type which cannot possibly be a poison error.