Enum authy::AuthyError
source · pub enum AuthyError {
BadRequest(Status),
UnauthorizedKey(Status),
Forbidden(Status),
UserNotFound(Status),
TooManyRequests(Status),
InternalServerError(Status),
ServiceUnavailable,
IoError(String),
JsonParseError(String),
RequestError(String),
InvalidServerResponse,
UnknownServerResponse(String),
}
Expand description
The error type used by this library.
Variants
BadRequest(Status)
There was an error with the request.
UnauthorizedKey(Status)
Either the API key or the verification token was invalid.
Forbidden(Status)
This account does not have access to the requested service.
UserNotFound(Status)
The authy user could not be found
TooManyRequests(Status)
You have reached the API usage limit.
InternalServerError(Status)
There was an internal server error.
ServiceUnavailable
The authy service was unavailable. Only returned after the configured retry_count
.
IoError(String)
There was an IO error.
JsonParseError(String)
There was an error deserializing a json object.
RequestError(String)
We made a request the server didn’t like.
InvalidServerResponse
The server gave an invalid response.
UnknownServerResponse(String)
Server responded with something we don’t know how to make use of.
Trait Implementations
sourceimpl Clone for AuthyError
impl Clone for AuthyError
sourcefn clone(&self) -> AuthyError
fn clone(&self) -> AuthyError
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for AuthyError
impl Debug for AuthyError
sourceimpl Display for AuthyError
impl Display for AuthyError
sourceimpl Error for AuthyError
impl Error for AuthyError
sourcefn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
sourcefn cause(&self) -> Option<&dyn Error>
fn cause(&self) -> Option<&dyn Error>
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
sourceimpl From<Error> for AuthyError
impl From<Error> for AuthyError
sourceimpl From<Error> for AuthyError
impl From<Error> for AuthyError
sourceimpl From<Error> for AuthyError
impl From<Error> for AuthyError
sourceimpl PartialEq<AuthyError> for AuthyError
impl PartialEq<AuthyError> for AuthyError
sourcefn eq(&self, other: &AuthyError) -> bool
fn eq(&self, other: &AuthyError) -> bool
impl Eq for AuthyError
impl StructuralEq for AuthyError
impl StructuralPartialEq for AuthyError
Auto Trait Implementations
impl RefUnwindSafe for AuthyError
impl Send for AuthyError
impl Sync for AuthyError
impl Unpin for AuthyError
impl UnwindSafe for AuthyError
Blanket Implementations
impl<T> AsFail for Twhere
T: Fail,
impl<T> AsFail for Twhere
T: Fail,
fn as_fail(&self) -> &(dyn Fail + 'static)
fn as_fail(&self) -> &(dyn Fail + 'static)
Converts a reference to
Self
into a dynamic trait object of Fail
.sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.impl<E> Fail for Ewhere
E: 'static + Error + Send + Sync,
impl<E> Fail for Ewhere
E: 'static + Error + Send + Sync,
fn cause(&self) -> Option<&(dyn Fail + 'static)>
fn cause(&self) -> Option<&(dyn Fail + 'static)>
Returns a reference to the underlying cause of this failure, if it
is an error that wraps other errors. Read more
fn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
Returns a reference to the
Backtrace
carried by this failure, if it
carries one. Read more