pub enum TokenCodecError {
EmptySigningKey,
SigningKeyTooShort,
Json(Error),
InvalidFormat,
InvalidHex(FromHexError),
InvalidSignature,
Expired,
Claims(TokenClaimsError),
}Expand description
Token signing or verification failure.
Variants§
EmptySigningKey
The signing key was empty.
SigningKeyTooShort
The signing key is too short.
Json(Error)
The token payload could not be serialized or deserialized.
InvalidFormat
The token string did not match the expected format.
InvalidHex(FromHexError)
A hex-encoded token segment was malformed.
InvalidSignature
The token signature did not verify.
Expired
The token has expired.
Claims(TokenClaimsError)
The token payload contained invalid claims.
Trait Implementations§
Source§impl Debug for TokenCodecError
impl Debug for TokenCodecError
Source§impl Display for TokenCodecError
impl Display for TokenCodecError
Source§impl Error for TokenCodecError
impl Error for TokenCodecError
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<Error> for TokenCodecError
impl From<Error> for TokenCodecError
Source§impl From<FromHexError> for TokenCodecError
impl From<FromHexError> for TokenCodecError
Source§fn from(source: FromHexError) -> Self
fn from(source: FromHexError) -> Self
Converts to this type from the input type.
Source§impl From<TokenClaimsError> for TokenCodecError
impl From<TokenClaimsError> for TokenCodecError
Source§fn from(source: TokenClaimsError) -> Self
fn from(source: TokenClaimsError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for TokenCodecError
impl !UnwindSafe for TokenCodecError
impl Freeze for TokenCodecError
impl Send for TokenCodecError
impl Sync for TokenCodecError
impl Unpin for TokenCodecError
impl UnsafeUnpin for TokenCodecError
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