pub enum SendRequestError {
Url(InvalidUrl),
Connect(ConnectError),
Send(Error),
Request(EncodeError),
Response(DecodeError),
Http(HttpError),
H2(OperationError),
Timeout,
TunnelNotSupported,
Error(Box<dyn Error>),
}
Expand description
A set of errors that can occur during request sending and response reading
Variants§
Url(InvalidUrl)
Invalid URL
Connect(ConnectError)
Failed to connect to host
Send(Error)
Error sending request
Request(EncodeError)
Error encoding request
Response(DecodeError)
Error parsing response
Http(HttpError)
Http error
H2(OperationError)
Http2 error
Timeout
Response took too long
TunnelNotSupported
Tunnels are not supported for http2 connection
Error(Box<dyn Error>)
Error sending request body
Trait Implementations§
source§impl Debug for SendRequestError
impl Debug for SendRequestError
source§impl Display for SendRequestError
impl Display for SendRequestError
source§impl Error for SendRequestError
impl Error for SendRequestError
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 From<ConnectError> for SendRequestError
impl From<ConnectError> for SendRequestError
source§fn from(source: ConnectError) -> Self
fn from(source: ConnectError) -> Self
Converts to this type from the input type.
source§impl From<DecodeError> for SendRequestError
impl From<DecodeError> for SendRequestError
source§fn from(source: DecodeError) -> Self
fn from(source: DecodeError) -> Self
Converts to this type from the input type.
source§impl From<Either<DecodeError, Error>> for SendRequestError
impl From<Either<DecodeError, Error>> for SendRequestError
source§impl From<Either<EncodeError, Error>> for SendRequestError
impl From<Either<EncodeError, Error>> for SendRequestError
source§impl From<EncodeError> for SendRequestError
impl From<EncodeError> for SendRequestError
source§fn from(source: EncodeError) -> Self
fn from(source: EncodeError) -> Self
Converts to this type from the input type.
source§impl From<Error> for SendRequestError
impl From<Error> for SendRequestError
source§impl From<Error> for SendRequestError
impl From<Error> for SendRequestError
source§impl From<FreezeRequestError> for SendRequestError
impl From<FreezeRequestError> for SendRequestError
source§fn from(e: FreezeRequestError) -> Self
fn from(e: FreezeRequestError) -> Self
Converts to this type from the input type.
source§impl From<InvalidUrl> for SendRequestError
impl From<InvalidUrl> for SendRequestError
source§fn from(source: InvalidUrl) -> Self
fn from(source: InvalidUrl) -> Self
Converts to this type from the input type.
source§impl From<OperationError> for SendRequestError
impl From<OperationError> for SendRequestError
source§fn from(source: OperationError) -> Self
fn from(source: OperationError) -> Self
Converts to this type from the input type.
source§impl From<SendRequestError> for SendClientRequest
impl From<SendRequestError> for SendClientRequest
source§fn from(e: SendRequestError) -> Self
fn from(e: SendRequestError) -> Self
Converts to this type from the input type.
source§impl WebResponseError for SendRequestError
impl WebResponseError for SendRequestError
Convert SendRequestError
to a server Response
source§fn status_code(&self) -> StatusCode
fn status_code(&self) -> StatusCode
Response’s status code Read more
source§fn error_response(&self, _: &HttpRequest) -> HttpResponse
fn error_response(&self, _: &HttpRequest) -> HttpResponse
Generate response for error Read more
Auto Trait Implementations§
impl !RefUnwindSafe for SendRequestError
impl !Send for SendRequestError
impl !Sync for SendRequestError
impl Unpin for SendRequestError
impl !UnwindSafe for SendRequestError
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