AccessResult

Type Alias AccessResult 

Source
pub type AccessResult<T> = Result<T, AccessError<T>>;
Expand description

Aliased Type§

pub enum AccessResult<T> {
    Ok(T),
    Err(AccessError<T>),
}

Variants§

§1.0.0

Ok(T)

Contains the success value

§1.0.0

Err(AccessError<T>)

Contains the error value

Trait Implementations§

Source§

impl<T> HandlePoisonResult for AccessResult<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.

Since every AccessError is caused by poison, the returned result is always Ok.

Read more about poison.

Source§

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.

Read more about poison.

Source§

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

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