#[non_exhaustive]pub enum ProviderError {
Unauthorized,
RateLimited {
service: &'static str,
retry_after: Option<i64>,
},
Network {
service: &'static str,
detail: String,
},
Unexpected {
service: &'static str,
status: u16,
},
Malformed {
service: &'static str,
detail: String,
},
InvalidGrant {
service: &'static str,
},
ShapeUnexpected {
provider: ProviderId,
detail: String,
},
Unsupported {
provider: ProviderId,
reason: String,
},
NoLogin {
provider: ProviderId,
},
}Expand description
Why an answer about a login could not be had.
Every variant says whether asking again later could answer differently, because that is the difference between a switch that should wait and one that should stop.
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.
RateLimited
retry_after is what the service said to wait, in seconds, where it said anything.
Network
Unexpected
Malformed
InvalidGrant
Refused for good: revoked, or already spent somewhere else.
ShapeUnexpected
The credential is not the shape this provider stores.
Unsupported
The tool is configured to keep its login somewhere pitboard does not handle.
NoLogin
The document holds no account’s login at all, which is what signing out leaves in a document the machine also keeps other things in. Not a malformed login: none.
Fields
§
provider: ProviderIdTrait Implementations§
Source§impl Debug for ProviderError
impl Debug for ProviderError
Source§impl Display for ProviderError
impl Display for ProviderError
Source§impl Error for ProviderError
impl Error for ProviderError
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()
Auto Trait Implementations§
impl Freeze for ProviderError
impl RefUnwindSafe for ProviderError
impl Send for ProviderError
impl Sync for ProviderError
impl Unpin for ProviderError
impl UnsafeUnpin for ProviderError
impl UnwindSafe for ProviderError
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