pub enum SmsDevError {
Http(Error),
Api {
code: String,
description: String,
},
UrlParse(ParseError),
Json(Error),
UnexpectedResponse(String),
}Expand description
All errors that can be produced by the SmsDev SDK.
Variants§
Http(Error)
An HTTP-level error returned by reqwest.
Api
The API returned a response with situacao = "ERROR".
Fields
UrlParse(ParseError)
A URL could not be constructed from the provided parameters.
Json(Error)
JSON serialisation / deserialisation error.
UnexpectedResponse(String)
The API returned an unexpected or empty response body.
Trait Implementations§
Source§impl Debug for SmsDevError
impl Debug for SmsDevError
Source§impl Display for SmsDevError
impl Display for SmsDevError
Source§impl Error for SmsDevError
impl Error for SmsDevError
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()
Source§impl From<Error> for SmsDevError
impl From<Error> for SmsDevError
Source§impl From<Error> for SmsDevError
impl From<Error> for SmsDevError
Source§impl From<ParseError> for SmsDevError
impl From<ParseError> for SmsDevError
Source§fn from(source: ParseError) -> Self
fn from(source: ParseError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for SmsDevError
impl !UnwindSafe for SmsDevError
impl Freeze for SmsDevError
impl Send for SmsDevError
impl Sync for SmsDevError
impl Unpin for SmsDevError
impl UnsafeUnpin for SmsDevError
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