#[non_exhaustive]pub enum EncodingError {
EmptyPolicyName,
PolicyNameTooLong {
actual: usize,
maximum: usize,
},
InvalidPolicyNameCharacter {
index: usize,
character: char,
},
StructuredFieldIntegerTooLarge {
actual: u64,
maximum: u64,
},
ZeroQuotaPeriod,
QuotaPeriodNotWholeSeconds {
actual: Duration,
},
UnsupportedDecision,
InvalidHeaderValue,
}Expand description
Failure to encode draft-11 response metadata.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
EmptyPolicyName
The public policy name was empty.
PolicyNameTooLong
The public policy name exceeded MAX_POLICY_NAME_LENGTH.
InvalidPolicyNameCharacter
The public policy name contained a character outside visible ASCII.
Fields
StructuredFieldIntegerTooLarge
A value exceeded the RFC 9651 Structured Field integer range.
ZeroQuotaPeriod
The policy’s replenishment period was zero.
QuotaPeriodNotWholeSeconds
The policy’s replenishment period was not an exact whole second.
UnsupportedDecision
The decision did not describe an allowed allowance or quota denial.
InvalidHeaderValue
A validated field unexpectedly failed the HTTP value grammar.
Trait Implementations§
Source§impl Clone for EncodingError
impl Clone for EncodingError
Source§impl Debug for EncodingError
impl Debug for EncodingError
Source§impl Display for EncodingError
impl Display for EncodingError
impl Eq for EncodingError
Source§impl Error for EncodingError
impl Error for EncodingError
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 EncodingError
impl PartialEq for EncodingError
impl StructuralPartialEq for EncodingError
Auto Trait Implementations§
impl Freeze for EncodingError
impl RefUnwindSafe for EncodingError
impl Send for EncodingError
impl Sync for EncodingError
impl Unpin for EncodingError
impl UnsafeUnpin for EncodingError
impl UnwindSafe for EncodingError
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