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
sourceimpl Debug for SendRequestError
impl Debug for SendRequestError
sourceimpl Display for SendRequestError
impl Display for SendRequestError
sourceimpl Error for SendRequestError
impl Error for SendRequestError
1.30.0 · sourcefn 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 · sourcefn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
sourceimpl From<(Box<dyn Error + 'static, Global>, Box<dyn Debug + 'static, Global>)> for SendRequestError
impl From<(Box<dyn Error + 'static, Global>, Box<dyn Debug + 'static, Global>)> for SendRequestError
sourceimpl From<Box<dyn Error + 'static, Global>> for SendRequestError
impl From<Box<dyn Error + 'static, Global>> for SendRequestError
sourcefn from(original: Box<dyn Error>) -> SendRequestError
fn from(original: Box<dyn Error>) -> SendRequestError
Converts to this type from the input type.
sourceimpl From<ConnectError> for SendRequestError
impl From<ConnectError> for SendRequestError
sourcefn from(original: ConnectError) -> SendRequestError
fn from(original: ConnectError) -> SendRequestError
Converts to this type from the input type.
sourceimpl From<Error> for SendRequestError
impl From<Error> for SendRequestError
sourcefn from(original: Error) -> SendRequestError
fn from(original: Error) -> SendRequestError
Converts to this type from the input type.
sourceimpl From<Error> for SendRequestError
impl From<Error> for SendRequestError
sourcefn from(original: HttpError) -> SendRequestError
fn from(original: HttpError) -> SendRequestError
Converts to this type from the input type.
sourceimpl From<Error> for SendRequestError
impl From<Error> for SendRequestError
sourcefn from(original: Error) -> SendRequestError
fn from(original: Error) -> SendRequestError
Converts to this type from the input type.
sourceimpl From<FreezeRequestError> for SendRequestError
impl From<FreezeRequestError> for SendRequestError
sourcefn from(err: FreezeRequestError) -> Self
fn from(err: FreezeRequestError) -> Self
Converts to this type from the input type.
sourceimpl From<InvalidUrl> for SendRequestError
impl From<InvalidUrl> for SendRequestError
sourcefn from(original: InvalidUrl) -> SendRequestError
fn from(original: InvalidUrl) -> SendRequestError
Converts to this type from the input type.
sourceimpl From<ParseError> for SendRequestError
impl From<ParseError> for SendRequestError
sourcefn from(original: ParseError) -> SendRequestError
fn from(original: ParseError) -> SendRequestError
Converts to this type from the input type.
sourceimpl From<SendRequestError> for SendClientRequest
impl From<SendRequestError> for SendClientRequest
sourcefn from(e: SendRequestError) -> Self
fn from(e: SendRequestError) -> Self
Converts to this type from the input type.
sourceimpl From<SendRequestError> for WsClientError
impl From<SendRequestError> for WsClientError
sourcefn from(original: SendRequestError) -> WsClientError
fn from(original: SendRequestError) -> WsClientError
Converts to this type from the input type.
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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more