#[non_exhaustive]pub enum ValidationError<RE: Error + Send + Sync + 'static> {
NotAuthorized,
RequestParseError(RequestParseError),
Request(RE),
InvalidToken(&'static str),
}
Expand description
Errors for AccessToken::validate_token and UserToken::from_response
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.
NotAuthorized
token is not authorized for use
RequestParseError(RequestParseError)
could not parse response when validating token
Request(RE)
failed to request validation
InvalidToken(&'static str)
given token is not of the correct token type: {0}
Implementations§
Source§impl ValidationError<Infallible>
impl ValidationError<Infallible>
Sourcepub fn into_other<RE: Error + Send + Sync + 'static>(
self,
) -> ValidationError<RE>
pub fn into_other<RE: Error + Send + Sync + 'static>( self, ) -> ValidationError<RE>
Convert this error from a infallible to another
Trait Implementations§
Source§impl<RE> Error for ValidationError<RE>
impl<RE> Error for ValidationError<RE>
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<RE: Error + Send + Sync + 'static> From<RequestParseError> for ValidationError<RE>
impl<RE: Error + Send + Sync + 'static> From<RequestParseError> for ValidationError<RE>
Source§fn from(source: RequestParseError) -> Self
fn from(source: RequestParseError) -> Self
Converts to this type from the input type.
Source§impl<RE: Error + Send + Sync + 'static> From<ValidationError<RE>> for ImplicitUserTokenExchangeError<RE>
impl<RE: Error + Send + Sync + 'static> From<ValidationError<RE>> for ImplicitUserTokenExchangeError<RE>
Source§fn from(source: ValidationError<RE>) -> Self
fn from(source: ValidationError<RE>) -> Self
Converts to this type from the input type.
Source§impl<RE: Error + Send + Sync + 'static> From<ValidationError<RE>> for UserTokenExchangeError<RE>
impl<RE: Error + Send + Sync + 'static> From<ValidationError<RE>> for UserTokenExchangeError<RE>
Source§fn from(source: ValidationError<RE>) -> Self
fn from(source: ValidationError<RE>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<RE> Freeze for ValidationError<RE>where
RE: Freeze,
impl<RE> !RefUnwindSafe for ValidationError<RE>
impl<RE> Send for ValidationError<RE>
impl<RE> Sync for ValidationError<RE>
impl<RE> Unpin for ValidationError<RE>where
RE: Unpin,
impl<RE> !UnwindSafe for ValidationError<RE>
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