#[non_exhaustive]pub enum PasetoError {
Base64DecodeError,
InvalidKey,
InvalidToken,
CryptoError,
PayloadError(Error),
}
Expand description
Error returned for all PASETO and PASERK operations that can fail
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.
Base64DecodeError
The token was not Base64 URL encoded correctly.
InvalidKey
Could not decode the provided key string
InvalidToken
The PASETO or PASERK was not of a valid form
CryptoError
Could not verify/decrypt the PASETO/PASERK.
PayloadError(Error)
There was an error with payload processing
Trait Implementations§
Source§impl Debug for PasetoError
impl Debug for PasetoError
Source§impl Display for PasetoError
impl Display for PasetoError
Source§impl Error for PasetoError
impl Error for PasetoError
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 Freeze for PasetoError
impl !RefUnwindSafe for PasetoError
impl Send for PasetoError
impl Sync for PasetoError
impl Unpin for PasetoError
impl !UnwindSafe for PasetoError
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