#[non_exhaustive]pub enum ConnectionError {
UnknownProvider(String),
OriginNotAllowed(String),
BadState,
NotFound(String),
NeedsReconnect(String),
Revoked,
Provider(ProviderFailure),
Config(String),
Db(DbError),
}Expand description
What a connection call can fail with.
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.
UnknownProvider(String)
The provider key is not one this venture configured.
OriginNotAllowed(String)
The return_to is not on an allowed origin.
BadState
The state is unknown, spent or expired.
NotFound(String)
No connection carries the id.
NeedsReconnect(String)
The provider requires a fresh authorization.
Revoked
The connection was revoked.
Provider(ProviderFailure)
The provider’s token endpoint failed or answered with a non-token.
Config(String)
The module is misconfigured, or a sealed value could not be read.
Db(DbError)
A database failure.
Implementations§
Source§impl ConnectionError
impl ConnectionError
Sourcepub fn slug(&self) -> &'static str
pub fn slug(&self) -> &'static str
The RFC 9457 type slug this failure maps to, so a route the venture
writes can answer the callback’s error=<slug> convention.
Sourcepub fn provider_failure(&self) -> Option<&ProviderFailure>
pub fn provider_failure(&self) -> Option<&ProviderFailure>
The structured, safe facts of a provider failure, when this is one —
what a log line records instead of the error’s Display.
Trait Implementations§
Source§impl Debug for ConnectionError
impl Debug for ConnectionError
Source§impl Display for ConnectionError
impl Display for ConnectionError
Source§impl Error for ConnectionError
impl Error for ConnectionError
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 ConnectionError
impl RefUnwindSafe for ConnectionError
impl Send for ConnectionError
impl Sync for ConnectionError
impl Unpin for ConnectionError
impl UnsafeUnpin for ConnectionError
impl UnwindSafe for ConnectionError
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