LockResult in std::sync - Rust
Description: A type alias for the result of a lock method which can be poisoned.

## LockResult

# Type Alias LockResult

1.0.0 · Source

    pub type LockResult<T> = Result<T, PoisonError<T>>;

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§

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

## Variants§

§1.0.0

### Ok(T)

Contains the success value

§1.0.0

### Err(PoisonError<T>)

Contains the error value