Enum dnsimple::errors::DNSimpleError
source · [−]pub enum DNSimpleError {
Unauthorized,
BadGateway,
BadRequest(String, Option<Value>),
GatewayTimeout(String),
MethodNotAllowed,
NotFound(String),
PaymentRequired,
PreconditionRequired(String),
ServiceUnavailable,
TooManyRequests,
Transport(String, String),
Deserialization(String),
}
Expand description
Represents the possible errors thrown while interacting with the DNSimple API
Variants
Unauthorized
BadGateway
BadRequest(String, Option<Value>)
GatewayTimeout(String)
MethodNotAllowed
NotFound(String)
PaymentRequired
PreconditionRequired(String)
ServiceUnavailable
TooManyRequests
Transport(String, String)
Deserialization(String)
Implementations
sourceimpl DNSimpleError
impl DNSimpleError
pub fn parse_response(code: u16, response: Response) -> DNSimpleError
pub fn parse_transport(transport: Transport) -> DNSimpleError
Trait Implementations
sourceimpl Debug for DNSimpleError
impl Debug for DNSimpleError
sourceimpl<'de> Deserialize<'de> for DNSimpleError
impl<'de> Deserialize<'de> for DNSimpleError
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Display for DNSimpleError
impl Display for DNSimpleError
sourceimpl Error for DNSimpleError
impl Error for DNSimpleError
1.30.0 · sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
🔬 This is a nightly-only experimental API. (
backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
👎 Deprecated since 1.42.0:
use the Display impl or to_string()
sourceimpl PartialEq<DNSimpleError> for DNSimpleError
impl PartialEq<DNSimpleError> for DNSimpleError
sourcefn eq(&self, other: &DNSimpleError) -> bool
fn eq(&self, other: &DNSimpleError) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &DNSimpleError) -> bool
fn ne(&self, other: &DNSimpleError) -> bool
This method tests for !=
.
sourceimpl Serialize for DNSimpleError
impl Serialize for DNSimpleError
impl StructuralPartialEq for DNSimpleError
Auto Trait Implementations
impl RefUnwindSafe for DNSimpleError
impl Send for DNSimpleError
impl Sync for DNSimpleError
impl Unpin for DNSimpleError
impl UnwindSafe for DNSimpleError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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