Enum awc::error::SendRequestError
source · #[non_exhaustive]pub enum SendRequestError {
Url(InvalidUrl),
Connect(ConnectError),
Send(Error),
Response(ParseError),
Http(HttpError),
H2(Error),
Timeout,
TunnelNotSupported,
Body(Box<dyn Error>),
Custom(Box<dyn Error>, Box<dyn Debug>),
}
Expand description
A set of errors that can occur during request sending and response reading
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Url(InvalidUrl)
Invalid URL
Connect(ConnectError)
Failed to connect to host
Send(Error)
Error sending request
Response(ParseError)
Error parsing response
Http(HttpError)
Http error
H2(Error)
Http2 error
Timeout
Response took too long
TunnelNotSupported
Tunnels are not supported for HTTP/2 connection
Body(Box<dyn Error>)
Error sending request body
Custom(Box<dyn Error>, Box<dyn Debug>)
Other errors that can occur after submitting a request.
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
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 From<ConnectError> for SendRequestError
impl From<ConnectError> for SendRequestError
source§fn from(original: ConnectError) -> SendRequestError
fn from(original: ConnectError) -> SendRequestError
Converts to this type from the input type.
source§impl From<Error> for SendRequestError
impl From<Error> for SendRequestError
source§fn from(original: HttpError) -> SendRequestError
fn from(original: HttpError) -> SendRequestError
Converts to this type from the input type.
source§impl From<Error> for SendRequestError
impl From<Error> for SendRequestError
source§fn from(original: Error) -> SendRequestError
fn from(original: Error) -> SendRequestError
Converts to this type from the input type.
source§impl From<Error> for SendRequestError
impl From<Error> for SendRequestError
source§fn from(original: Error) -> SendRequestError
fn from(original: Error) -> SendRequestError
Converts to this type from the input type.
source§impl From<FreezeRequestError> for SendRequestError
impl From<FreezeRequestError> for SendRequestError
source§fn from(err: FreezeRequestError) -> Self
fn from(err: FreezeRequestError) -> Self
Converts to this type from the input type.
source§impl From<InvalidUrl> for SendRequestError
impl From<InvalidUrl> for SendRequestError
source§fn from(original: InvalidUrl) -> SendRequestError
fn from(original: InvalidUrl) -> SendRequestError
Converts to this type from the input type.
source§impl From<ParseError> for SendRequestError
impl From<ParseError> for SendRequestError
source§fn from(original: ParseError) -> SendRequestError
fn from(original: ParseError) -> SendRequestError
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 From<SendRequestError> for WsClientError
impl From<SendRequestError> for WsClientError
source§fn from(original: SendRequestError) -> WsClientError
fn from(original: SendRequestError) -> WsClientError
Converts to this type from the input type.
Auto Trait Implementations§
impl !Freeze for SendRequestError
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