#[non_exhaustive]pub enum UserTokenExchangeError<RE: Error + Send + Sync + 'static> {
RequestError(RE),
RequestParseError(RequestParseError),
StateMismatch,
ValidationError(ValidationError<RE>),
}
Available on crate feature
client
only.Expand description
Errors for UserTokenBuilder::get_user_token
and UserToken::mock_token
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.
RequestError(RE)
request for user token failed
RequestParseError(RequestParseError)
could not parse response when getting user token
StateMismatch
state CSRF does not match when exchanging user token
ValidationError(ValidationError<RE>)
could not get validation for user token
Trait Implementations§
Source§impl<RE> Error for UserTokenExchangeError<RE>
impl<RE> Error for UserTokenExchangeError<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 UserTokenExchangeError<RE>
impl<RE: Error + Send + Sync + 'static> From<RequestParseError> for UserTokenExchangeError<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 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 UserTokenExchangeError<RE>where
RE: Freeze,
impl<RE> !RefUnwindSafe for UserTokenExchangeError<RE>
impl<RE> Send for UserTokenExchangeError<RE>
impl<RE> Sync for UserTokenExchangeError<RE>
impl<RE> Unpin for UserTokenExchangeError<RE>where
RE: Unpin,
impl<RE> !UnwindSafe for UserTokenExchangeError<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