W3cubDocs

/Rust

Type Alias TryLockResult

pub type TryLockResult<Guard> = Result<Guard, WouldBlock>;
🔬This is a nightly-only experimental API. (sync_nonpoison #134645)

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

Aliased Type

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

Variants

Ok(Guard)
🔬This is a nightly-only experimental API. (sync_nonpoison #134645)

Contains the success value

Err(WouldBlock)
🔬This is a nightly-only experimental API. (sync_nonpoison #134645)

Contains the error value

© 2010 The Rust Project Developers
Licensed under the Apache License, Version 2.0 or the MIT license, at your option.
https://doc.rust-lang.org/std/sync/nonpoison/type.TryLockResult.html