pub struct Exhausted {
pub retry_after: Duration,
}Expand description
What try_consume returns when the bucket cannot satisfy the
requested cost. retry_after is how long (rounded up) until
enough tokens will have accrued to complete the call.
Rounding up matters: an operator-visible “retry in 0s” is a lie when the real answer is “retry in 400 ms” — we floor to the next whole second so the countdown in the status bar and the HttpError it becomes never advertise a shorter wait than is actually needed.
Fields§
§retry_after: DurationTrait Implementations§
impl Copy for Exhausted
impl Eq for Exhausted
impl StructuralPartialEq for Exhausted
Auto Trait Implementations§
impl Freeze for Exhausted
impl RefUnwindSafe for Exhausted
impl Send for Exhausted
impl Sync for Exhausted
impl Unpin for Exhausted
impl UnsafeUnpin for Exhausted
impl UnwindSafe for Exhausted
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