pub enum OAuthError {
Unavailable(CloudProvider),
StateMismatch,
Denied(OAuthRedirectError),
MissingCode,
Cancelled,
Timeout,
Reauthorize(CloudProvider),
InvalidRedirect,
Io(Error),
Presentation(Box<dyn Error + Send + Sync>),
Storage(StorageError),
}Expand description
Sign-in failures distinguish cancellation, invalid redirects and provider refusal.
Variants§
This provider has no OAuth client id or presenter configured.
StateMismatch
Redirect state is missing or different.
Denied(OAuthRedirectError)
The provider returned access_denied, retaining its checked callback.
MissingCode
The callback omitted its authorization code.
Cancelled
The caller cancelled sign-in.
Timeout
No callback arrived before the deadline.
A new provider sign-in is required.
InvalidRedirect
The redirect URI or callback request is malformed.
Io(Error)
The browser or local redirect listener failed.
Presentation(Box<dyn Error + Send + Sync>)
The app’s native sign-in sheet failed.
Storage(StorageError)
Network or provider failure, preserving its classification.
Trait Implementations§
Source§impl CarriesBug for OAuthError
impl CarriesBug for OAuthError
Source§impl Debug for OAuthError
impl Debug for OAuthError
Source§impl Display for OAuthError
impl Display for OAuthError
Source§impl Error for OAuthError
impl Error for OAuthError
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 OAuthError
impl From<Error> for OAuthError
Source§impl From<StorageError> for OAuthError
impl From<StorageError> for OAuthError
Source§fn from(source: StorageError) -> Self
fn from(source: StorageError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for OAuthError
impl !RefUnwindSafe for OAuthError
impl Send for OAuthError
impl Sync for OAuthError
impl Unpin for OAuthError
impl UnsafeUnpin for OAuthError
impl !UnwindSafe for OAuthError
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.