pub enum DNSimpleError {
Show 13 variants
Unauthorized,
BadGateway,
BadRequest {
message: String,
attribute_errors: Option<Value>,
},
GatewayTimeout(String),
MethodNotAllowed,
NotFound(String),
PaymentRequired,
PreconditionRequired(String),
ServiceUnavailable,
TooManyRequests,
UnexpectedStatus(u16),
Network(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
UnexpectedStatus(u16)
Network(String)
Deserialization(String)
Implementations§
Source§impl DNSimpleError
impl DNSimpleError
pub fn parse_response(code: u16, body: Option<Value>) -> DNSimpleError
Trait Implementations§
Source§impl Debug for DNSimpleError
impl Debug for DNSimpleError
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)>
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 DNSimpleError
impl RefUnwindSafe for DNSimpleError
impl Send for DNSimpleError
impl Sync for DNSimpleError
impl Unpin for DNSimpleError
impl UnsafeUnpin for DNSimpleError
impl UnwindSafe for DNSimpleError
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