#[non_exhaustive]pub enum RequestStateError {
WeakKey,
ZeroTtl,
TooLarge(usize),
Malformed,
UnsupportedVersion,
Integrity,
Expired,
SubjectMismatch,
Encode(Error),
Decode(Error),
Clock,
}Expand description
Errors produced while encoding or validating opaque MRTR request state.
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.
WeakKey
HMAC keys shorter than 256 bits do not meet this codec’s minimum.
ZeroTtl
The configured TTL must allow the state to live for some amount of time.
TooLarge(usize)
The serialized state exceeded the configured token-size limit.
Malformed
The token did not have the versioned three-part wire shape.
UnsupportedVersion
The token uses a codec version this server does not understand.
Integrity
The HMAC did not match the payload.
Expired
The token is no longer valid.
SubjectMismatch
A token bound to one authorization subject was used by another.
Encode(Error)
The state value could not be serialized.
Decode(Error)
The state value could not be decoded as the expected type.
Clock
The system clock is earlier than the Unix epoch.
Trait Implementations§
Source§impl Debug for RequestStateError
impl Debug for RequestStateError
Source§impl Display for RequestStateError
impl Display for RequestStateError
Source§impl Error for RequestStateError
impl Error for RequestStateError
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()
Auto Trait Implementations§
impl !RefUnwindSafe for RequestStateError
impl !UnwindSafe for RequestStateError
impl Freeze for RequestStateError
impl Send for RequestStateError
impl Sync for RequestStateError
impl Unpin for RequestStateError
impl UnsafeUnpin for RequestStateError
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