Enum dnsimple::errors::DNSimpleError
source · pub enum DNSimpleError {
Unauthorized,
BadGateway,
BadRequest {
message: String,
attribute_errors: 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§
BadGateway
BadRequest
GatewayTimeout(String)
MethodNotAllowed
NotFound(String)
PaymentRequired
PreconditionRequired(String)
TooManyRequests
Transport(String, String)
Deserialization(String)
Implementations§
source§impl DNSimpleError
impl DNSimpleError
pub fn parse_response(code: u16, response: Response) -> DNSimpleError
pub fn parse_transport(transport: Transport) -> DNSimpleError
Trait Implementations§
source§impl Debug for DNSimpleError
impl Debug for DNSimpleError
source§impl<'de> Deserialize<'de> for DNSimpleError
impl<'de> Deserialize<'de> for DNSimpleError
source§fn 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
source§impl Display for DNSimpleError
impl Display for DNSimpleError
source§impl Error for DNSimpleError
impl Error for DNSimpleError
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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()
source§impl PartialEq<DNSimpleError> for DNSimpleError
impl PartialEq<DNSimpleError> for DNSimpleError
source§fn 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 ==
.