pub enum OAuthError {
LockUnavailable(String),
Request(String),
Timeout(Elapsed),
TokenUnavailable,
}Expand description
Represents the different types of errors that can occur during OAuth operations.
The OAuthError enum encapsulates various error scenarios that may arise during the OAuth process,
such as acquiring token locks, making requests, handling timeouts, or token unavailability.
§Variants
-
LockUnavailableIndicates a failure to acquire a lock for the token. This typically occurs when a lock mechanism is being used to ensure safe concurrent access to OAuth tokens.- Fields:
String: A message providing additional context about the lock failure.
- Fields:
-
RequestRepresents a failure that occurred during an OAuth-related request.- Fields:
String: A message describing the nature of the request failure.
- Fields:
-
TimeoutIndicates that a timeout occurred during an OAuth operation. This variant wraps theElapsedtype from thetokiocrate, which provides details about the timeout event.- Source:
Elapsed
- Source:
-
TokenUnavailableIndicates that a required token was not available. This error typically occurs when attempting to retrieve or use an OAuth token that has not been issued or is otherwise inaccessible.
Variants§
Trait Implementations§
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)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl From<Elapsed> for OAuthError
impl From<Elapsed> for OAuthError
Source§impl<T> From<PoisonError<T>> for OAuthError
impl<T> From<PoisonError<T>> for OAuthError
Source§fn from(err: PoisonError<T>) -> Self
fn from(err: PoisonError<T>) -> Self
Auto Trait Implementations§
impl Freeze for OAuthError
impl RefUnwindSafe for OAuthError
impl Send for OAuthError
impl Sync for OAuthError
impl Unpin 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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::RequestSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.