pub struct InsufficientPermitsError { /* private fields */ }Expand description
Error returned when we lack sufficient permits to perform an operation.
-
With the
semaphore-totalflag: Semaphore lacks sufficient permits when using acquire_within_total -
When more permits were requested via SemaphorePermit::split.than the permit contains.
Contains the requested count of permits via requested and optionally the total available when the request failed via total.
Note that total may be None if the requester was evicted after being queued due to insufficient capacity (at which point, we don’t know what the total permits for the queue was)
Implementations§
Trait Implementations§
Source§impl Clone for InsufficientPermitsError
impl Clone for InsufficientPermitsError
Source§fn clone(&self) -> InsufficientPermitsError
fn clone(&self) -> InsufficientPermitsError
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 InsufficientPermitsError
impl Debug for InsufficientPermitsError
Source§impl Display for InsufficientPermitsError
impl Display for InsufficientPermitsError
Source§impl Error for InsufficientPermitsError
impl Error for InsufficientPermitsError
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 PartialEq for InsufficientPermitsError
impl PartialEq for InsufficientPermitsError
impl Copy for InsufficientPermitsError
impl Eq for InsufficientPermitsError
impl StructuralPartialEq for InsufficientPermitsError
Auto Trait Implementations§
impl Freeze for InsufficientPermitsError
impl RefUnwindSafe for InsufficientPermitsError
impl Send for InsufficientPermitsError
impl Sync for InsufficientPermitsError
impl Unpin for InsufficientPermitsError
impl UnsafeUnpin for InsufficientPermitsError
impl UnwindSafe for InsufficientPermitsError
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