pub enum RateLimitError {
ZeroRate,
ZeroBurst,
ZeroPeriod,
InvalidLimit,
InvalidCapacity,
ZeroCapacity,
Overflow,
}Expand description
Configuration validation errors returned by rate-limiter constructors.
Variants§
ZeroRate
Configured rate or refill token count was zero.
ZeroBurst
Configured burst size was zero.
ZeroPeriod
Configured period, window, or emission interval was zero.
InvalidLimit
Configured limit was zero or exceeded the lock-free 32-bit bound.
InvalidCapacity
Configured token-bucket capacity was zero or exceeded the lock-free 32-bit bound.
ZeroCapacity
Configured keyed limiter entry capacity was zero.
Overflow
Intermediate nanosecond calculation overflowed u64.
Trait Implementations§
Source§impl Clone for RateLimitError
impl Clone for RateLimitError
impl Copy for RateLimitError
Source§impl Debug for RateLimitError
impl Debug for RateLimitError
Source§impl Display for RateLimitError
Formats RateLimitError variants as human-readable messages.
impl Display for RateLimitError
Formats RateLimitError variants as human-readable messages.
impl Eq for RateLimitError
Source§impl Error for RateLimitError
Marks RateLimitError as a standard error type.
impl Error for RateLimitError
Marks RateLimitError as a standard error type.
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 Hash for RateLimitError
impl Hash for RateLimitError
Source§impl PartialEq for RateLimitError
impl PartialEq for RateLimitError
impl StructuralPartialEq for RateLimitError
Auto Trait Implementations§
impl Forget for RateLimitError
impl Freeze for RateLimitError
impl Move for RateLimitError
impl RefUnwindSafe for RateLimitError
impl Send for RateLimitError
impl Sync for RateLimitError
impl Unpin for RateLimitError
impl UnsafeUnpin for RateLimitError
impl UnwindSafe for RateLimitError
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