pub enum TryAcquireError {
WouldBlock,
Poisoned,
}
Expand description
An error returned from Semaphore::try_acquire
and Semaphore::try_acquire_arc
. See
Semaphore::try_acquire_arc
for an example usage.
Variants§
WouldBlock
Semaphore::try_acquire
failed because Semaphore::acquire
would have blocked. Either
there are insufficient available permits or there is another pending call to acquire.
Poisoned
Semaphore::try_acquire
failed because the Semaphore
is poisoned.
Trait Implementations§
Source§impl Clone for TryAcquireError
impl Clone for TryAcquireError
Source§fn clone(&self) -> TryAcquireError
fn clone(&self) -> TryAcquireError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for TryAcquireError
impl Debug for TryAcquireError
Source§impl Display for TryAcquireError
impl Display for TryAcquireError
Source§impl Error for TryAcquireError
impl Error for TryAcquireError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns 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 From<PoisonError> for TryAcquireError
impl From<PoisonError> for TryAcquireError
Source§fn from(_: PoisonError) -> Self
fn from(_: PoisonError) -> Self
Converts to this type from the input type.
Source§impl Hash for TryAcquireError
impl Hash for TryAcquireError
Source§impl Ord for TryAcquireError
impl Ord for TryAcquireError
Source§fn cmp(&self, other: &TryAcquireError) -> Ordering
fn cmp(&self, other: &TryAcquireError) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for TryAcquireError
impl PartialEq for TryAcquireError
Source§impl PartialOrd for TryAcquireError
impl PartialOrd for TryAcquireError
impl Copy for TryAcquireError
impl Eq for TryAcquireError
impl StructuralPartialEq for TryAcquireError
Auto Trait Implementations§
impl Freeze for TryAcquireError
impl RefUnwindSafe for TryAcquireError
impl Send for TryAcquireError
impl Sync for TryAcquireError
impl Unpin for TryAcquireError
impl UnwindSafe for TryAcquireError
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