pub enum Error {
User(String),
Proto(String),
Io(Error),
Http11Parser(Error),
H2(Error),
Http(Error),
Json(Error),
TlsError(TLSError),
DnsName(InvalidDNSNameError),
AddrParse(AddrParseError),
}Expand description
Errors from hreq.
Variants§
User(String)
The user of the lib did something to cause an error.
Proto(String)
Some protocol level error when talking to a server, not the user’s fault.
Io(Error)
std::io::Error, such as connection problems, DNS lookup failures or timeouts.
Http11Parser(Error)
Failures to parse incoming HTTP/1.1 responses.
H2(Error)
Errors originating in HTTP/2 (via the h2 crate).
Http(Error)
Error from the http crate, such as http::Request, http::Response or URI.
Json(Error)
JSON deserialization errors.
TlsError(TLSError)
TLS (https) errors.
DnsName(InvalidDNSNameError)
Failure to convert a domain name as TLS cert name.
AddrParse(AddrParseError)
Failure to parse an address that the server will listen to.
Implementations§
Trait Implementations§
Source§impl Error for Error
impl Error for Error
1.30.0 · 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<AddrParseError> for Error
impl From<AddrParseError> for Error
Source§fn from(e: AddrParseError) -> Self
fn from(e: AddrParseError) -> Self
Converts to this type from the input type.
Source§impl From<InvalidDNSNameError> for Error
impl From<InvalidDNSNameError> for Error
Source§fn from(e: InvalidDNSNameError) -> Self
fn from(e: InvalidDNSNameError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
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