Enum TryLockError

enum TryLockError<T>

An enumeration of possible errors associated with a TryLockResult which can occur while trying to acquire a lock, from the try_lock method on a Mutex or the try_read and try_write methods on an RwLock.

Variants

Poisoned(PoisonError<T>)

The lock could not be acquired because another thread failed while holding the lock.

WouldBlock

The lock could not be acquired at this time because the operation would otherwise block.

Implementations

impl<T> Any for TryLockError<T>

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for TryLockError<T>

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for TryLockError<T>

fn borrow_mut(self: &mut Self) -> &mut T

impl<T> Debug for TryLockError<T>

fn fmt(self: &Self, f: &mut fmt::Formatter<'_>) -> fmt::Result

impl<T> Display for TryLockError<T>

fn fmt(self: &Self, f: &mut fmt::Formatter<'_>) -> fmt::Result

impl<T> Error for TryLockError<T>

fn cause(self: &Self) -> Option<&dyn Error>

impl<T> Freeze for TryLockError<T>

impl<T> From for TryLockError<T>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> From for TryLockError<T>

fn from(err: PoisonError<T>) -> TryLockError<T>

impl<T> RefUnwindSafe for TryLockError<T>

impl<T> Send for TryLockError<T>

impl<T> Sync for TryLockError<T>

impl<T> ToString for TryLockError<T>

fn to_string(self: &Self) -> String

impl<T> Unpin for TryLockError<T>

impl<T> UnwindSafe for TryLockError<T>

impl<T, U> Into for TryLockError<T>

fn into(self: Self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom for TryLockError<T>

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto for TryLockError<T>

fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>