Type Alias tracing_core::stdlib::sync::TryLockResult

1.0.0 · source ·
pub type TryLockResult<Guard> = Result<Guard, TryLockError<Guard>>;
Expand description

A type alias for the result of a nonblocking locking method.

For more information, see LockResult. A TryLockResult doesn’t necessarily hold the associated guard in the Err type as the lock might not have been acquired for other reasons.

Aliased Type§

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

Variants§

§

Ok(Guard)

Contains the success value

§

Err(TryLockError<Guard>)

Contains the error value