#[non_exhaustive]pub enum AuthFailure {
NoCredentialProvider,
CredentialsUnavailable {
detail: String,
},
UnusableCredentials,
UrlNotDescribable,
UnsupportedScheme {
schemes: Vec<String>,
},
Rejected,
}Expand description
Why an HTTP remote refused access (Error::Auth).
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.
NoCredentialProvider
The server asked for credentials (401) and no credential provider is wired.
The credential provider could not supply credentials (no helper has them, and prompting is not possible).
UnusableCredentials
The provider answered without a usable username and password.
UrlNotDescribable
The URL could not be split into the credential fields helpers expect.
UnsupportedScheme
The server only offers authentication schemes grit does not speak (no Basic).
Rejected
Credentials were sent and the server rejected them (401 again).
Implementations§
Source§impl AuthFailure
impl AuthFailure
Sourcepub fn is_rejected(&self) -> bool
pub fn is_rejected(&self) -> bool
Whether credentials were sent and refused, as opposed to never being available.
Trait Implementations§
Source§impl Clone for AuthFailure
impl Clone for AuthFailure
Source§impl Debug for AuthFailure
impl Debug for AuthFailure
Source§impl Display for AuthFailure
impl Display for AuthFailure
impl Eq for AuthFailure
Source§impl Error for AuthFailure
impl Error for AuthFailure
1.30.0 · 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 PartialEq for AuthFailure
impl PartialEq for AuthFailure
impl StructuralPartialEq for AuthFailure
Auto Trait Implementations§
impl Freeze for AuthFailure
impl RefUnwindSafe for AuthFailure
impl Send for AuthFailure
impl Sync for AuthFailure
impl Unpin for AuthFailure
impl UnsafeUnpin for AuthFailure
impl UnwindSafe for AuthFailure
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