#[non_exhaustive]pub enum ServerAuthError {
InvalidUrl(String),
UnsupportedScheme(String),
TokenRejected,
Http(Error),
NotGritServer(String),
LoginDenied,
LoginExpired,
}Expand description
Why a server URL could not be used or a token could not be verified.
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.
InvalidUrl(String)
The URL could not be parsed, or has no host.
UnsupportedScheme(String)
The URL’s scheme is not http or https.
TokenRejected
The server refused the token (401).
Http(Error)
The request failed (connection, TLS, or an HTTP error status).
NotGritServer(String)
The server answered, but not like a grit serve host: a client error
status from a .grit/ endpoint, or a body that is not grit’s JSON.
LoginDenied
The user declined the login code in the browser.
LoginExpired
The login code expired before the user approved it.
Trait Implementations§
Source§impl Debug for ServerAuthError
impl Debug for ServerAuthError
Source§impl Display for ServerAuthError
impl Display for ServerAuthError
Source§impl Error for ServerAuthError
impl Error for ServerAuthError
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 !RefUnwindSafe for ServerAuthError
impl !UnwindSafe for ServerAuthError
impl Freeze for ServerAuthError
impl Send for ServerAuthError
impl Sync for ServerAuthError
impl Unpin for ServerAuthError
impl UnsafeUnpin for ServerAuthError
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