pub enum Error {
InvalidTokenLength,
InvalidTokenSignature,
SerdeJsonError(Error),
SignError(InvalidLength),
B64DecodeError(DecodeError),
FromUtf8Error(FromUtf8Error),
}Expand description
Crate level error. Supplies both user-level single error and inner dependency errors.
Variants§
InvalidTokenLength
token.split('.') is less than 3 parts.
InvalidTokenSignature
Token signature is not the same as Alg(header.payload, secret).
SerdeJsonError(Error)
serde_json::Error error wrapper.
SignError(InvalidLength)
hmac::digest::InvalidLength error wrapper.
B64DecodeError(DecodeError)
base64::DecodeError error wrapper.
FromUtf8Error(FromUtf8Error)
std::string::FromUtf8Error error wrapper.
Trait Implementations§
Source§impl From<DecodeError> for Error
impl From<DecodeError> for Error
Source§fn from(error: DecodeError) -> Self
fn from(error: DecodeError) -> Self
Converts to this type from the input type.
Source§impl From<FromUtf8Error> for Error
impl From<FromUtf8Error> for Error
Source§fn from(error: FromUtf8Error) -> Self
fn from(error: FromUtf8Error) -> Self
Converts to this type from the input type.
Source§impl From<InvalidLength> for Error
impl From<InvalidLength> for Error
Source§fn from(error: InvalidLength) -> Self
fn from(error: InvalidLength) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
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