solana_type_overrides::sync::poison

Type Alias LockResult

Source
pub type LockResult<T> = Result<T, PoisonError<T>>;
🔬This is a nightly-only experimental API. (sync_poison_mod)
Expand description

A type alias for the result of a lock method which can be poisoned.

The Ok variant of this result indicates that the primitive was not poisoned, and the operation result is contained within. The Err variant indicates that the primitive was poisoned. Note that the Err variant also carries an associated value assigned by the lock method, and it can be acquired through the into_inner method. The semantics of the associated value depends on the corresponding lock method.

Aliased Type§

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

Variants§

§

Ok(T)

🔬This is a nightly-only experimental API. (sync_poison_mod)

Contains the success value

§

Err(PoisonError<T>)

🔬This is a nightly-only experimental API. (sync_poison_mod)

Contains the error value