pub enum SendRequest {
AuthenticationRequired,
BadStatusCode {
status_code: StatusCode,
response_string: String,
code: Option<i64>,
message: Option<String>,
},
SystemTimeError {
source: SystemTimeError,
},
SurfError {
source: Error,
status_code: StatusCode,
type_name: Option<String>,
},
SerdeJsonError {
source: Error,
},
ResponseError {
source: Response,
},
ParameterError {
source: Parameter,
},
}Expand description
Occurs when there is an error sending a request.
Variants§
AuthenticationRequired
Endpoint requires authentication.
BadStatusCode
Received a status code other than 200 OK.
Fields
§
status_code: StatusCodeHTTP status code.
SystemTimeError
System time error occurred.
Fields
§
source: SystemTimeErrorSource of the error.
SurfError
Surf error occurred.
Fields
§
status_code: StatusCodeHTTP status code associated with the error.
SerdeJsonError
Serde JSON error occurred.
ResponseError
Response error occurred.
ParameterError
Parameter error occurred.
Trait Implementations§
Source§impl Debug for SendRequest
impl Debug for SendRequest
Source§impl Display for SendRequest
impl Display for SendRequest
Source§impl Error for SendRequest
impl Error for SendRequest
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 SendRequest
impl From<Error> for SendRequest
Source§impl From<Error> for SendRequest
impl From<Error> for SendRequest
Source§impl From<Parameter> for SendRequest
impl From<Parameter> for SendRequest
Source§impl From<Response> for SendRequest
impl From<Response> for SendRequest
Source§impl From<SystemTimeError> for SendRequest
impl From<SystemTimeError> for SendRequest
Source§fn from(source: SystemTimeError) -> Self
fn from(source: SystemTimeError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for SendRequest
impl !RefUnwindSafe for SendRequest
impl Send for SendRequest
impl Sync for SendRequest
impl Unpin for SendRequest
impl !UnwindSafe for SendRequest
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