#[non_exhaustive]pub enum PostError {
Url(String),
Header(String),
Address {
host: String,
addr: IpAddr,
why: Forbidden,
},
PlainOffMachine {
host: String,
addr: IpAddr,
},
Unreachable(String),
Tls(String),
Io(Error),
Response(String),
}Expand description
Why a request was not made or not answered.
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(String)
The URL is not one this client sends to.
Header(String)
A header name or value that would change the request’s framing.
Address
The name resolved to an address that is never reached.
PlainOffMachine
Plain http to an address that is not loopback.
Unreachable(String)
Nothing answered.
Tls(String)
TLS could not be set up or failed.
Io(Error)
Reading or writing failed, or timed out.
Response(String)
The answer is not an HTTP/1.x response head within the limits.
Trait Implementations§
Source§impl Error for PostError
impl Error for PostError
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()
Auto Trait Implementations§
impl !RefUnwindSafe for PostError
impl !UnwindSafe for PostError
impl Forget for PostError
impl Freeze for PostError
impl Move for PostError
impl Send for PostError
impl Sync for PostError
impl Unpin for PostError
impl UnsafeUnpin for PostError
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