pub enum GcraPolicyError {
ZeroQuota,
QuotaTooLarge {
actual: u64,
maximum: u64,
},
ZeroBurstCapacity,
BurstCapacityTooLarge {
actual: u64,
maximum: u64,
},
ZeroPeriod,
PeriodNotWholeMilliseconds,
PeriodTooLarge {
actual: Duration,
maximum: Duration,
},
RefillDurationTooLarge {
actual_millis: u128,
maximum_millis: u64,
},
}Expand description
An invalid GCRA policy configuration.
Variants§
ZeroQuota
The replenishment quota was zero.
QuotaTooLarge
The replenishment quota exceeded the portable backend maximum.
ZeroBurstCapacity
The burst capacity was zero.
BurstCapacityTooLarge
The burst capacity exceeded the portable backend maximum.
Fields
ZeroPeriod
The replenishment period was zero.
PeriodNotWholeMilliseconds
The replenishment period had finer precision than a millisecond.
PeriodTooLarge
The replenishment period exceeded the portable backend maximum.
RefillDurationTooLarge
Filling the complete burst would take longer than the portable maximum.
Trait Implementations§
Source§impl Clone for GcraPolicyError
impl Clone for GcraPolicyError
Source§fn clone(&self) -> GcraPolicyError
fn clone(&self) -> GcraPolicyError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for GcraPolicyError
Source§impl Debug for GcraPolicyError
impl Debug for GcraPolicyError
Source§impl Display for GcraPolicyError
impl Display for GcraPolicyError
impl Eq for GcraPolicyError
Source§impl Error for GcraPolicyError
impl Error for GcraPolicyError
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<PolicyError> for GcraPolicyError
impl From<PolicyError> for GcraPolicyError
Source§fn from(error: PolicyError) -> Self
fn from(error: PolicyError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for GcraPolicyError
impl PartialEq for GcraPolicyError
impl StructuralPartialEq for GcraPolicyError
Auto Trait Implementations§
impl Freeze for GcraPolicyError
impl RefUnwindSafe for GcraPolicyError
impl Send for GcraPolicyError
impl Sync for GcraPolicyError
impl Unpin for GcraPolicyError
impl UnsafeUnpin for GcraPolicyError
impl UnwindSafe for GcraPolicyError
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