TryLockResult

Type Alias TryLockResult 

Source
pub type TryLockResult<T> = Result<T, TryLockError<T>>;
Expand description

The result type returned by ThreadCheckedMutex::try_lock.

Aliased Type§

pub enum TryLockResult<T> {
    Ok(T),
    Err(TryLockError<T>),
}

Variants§

§1.0.0

Ok(T)

Contains the success value

§1.0.0

Err(TryLockError<T>)

Contains the error value

Trait Implementations§

Source§

impl<T> HandlePoisonResult for TryLockResult<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, TryLockError<Infallible>>

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