Enum cancel_safe_futures::sync::TryLockError
source · pub enum TryLockError<T> {
Poisoned(PoisonError<T>),
WouldBlock,
}
Available on crate feature
std
only.Expand description
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
RobustMutex
.
Variants§
Poisoned(PoisonError<T>)
The lock could not be acquired because another task failed while holding the lock, or an early cancellation occurred.
WouldBlock
The lock could not be acquired at this time because the operation would otherwise block.
Trait Implementations§
source§impl<T> Debug for TryLockError<T>
impl<T> Debug for TryLockError<T>
source§impl<T> Display for TryLockError<T>
impl<T> Display for TryLockError<T>
source§impl<T> Error for TryLockError<T>
impl<T> Error for TryLockError<T>
source§fn cause(&self) -> Option<&dyn Error>
fn cause(&self) -> Option<&dyn Error>
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl<T> From<PoisonError<T>> for TryLockError<T>
impl<T> From<PoisonError<T>> for TryLockError<T>
source§fn from(error: PoisonError<T>) -> TryLockError<T>
fn from(error: PoisonError<T>) -> TryLockError<T>
Converts to this type from the input type.
Auto Trait Implementations§
impl<T> Freeze for TryLockError<T>where
T: Freeze,
impl<T> RefUnwindSafe for TryLockError<T>where
T: RefUnwindSafe,
impl<T> Send for TryLockError<T>where
T: Send,
impl<T> Sync for TryLockError<T>where
T: Sync,
impl<T> Unpin for TryLockError<T>where
T: Unpin,
impl<T> UnwindSafe for TryLockError<T>where
T: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more