Enum tokio::sync::TryAcquireError
source · pub enum TryAcquireError {
Closed,
NoPermits,
}
Expand description
Error returned from the Semaphore::try_acquire
function.
Variants§
Closed
The semaphore has been closed and cannot issue new permits.
NoPermits
The semaphore has no available permits.
Trait Implementations§
source§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)>
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 PartialEq<TryAcquireError> for TryAcquireError
impl PartialEq<TryAcquireError> for TryAcquireError
source§fn eq(&self, other: &TryAcquireError) -> bool
fn eq(&self, other: &TryAcquireError) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.