pub enum Error {
InvalidAddress {
address: String,
reason: &'static str,
},
Unsupported {
operation: &'static str,
address: Address,
reason: &'static str,
},
InvalidPath {
path: String,
},
Resolve {
host: String,
source: Error,
},
Target {
action: &'static str,
target: String,
source: Error,
},
MalformedResponse {
address: Address,
reason: String,
},
TimedOut {
operation: &'static str,
target: String,
limit: Duration,
},
Input {
source: Error,
},
Output {
source: Error,
},
}Expand description
An error from a courier operation.
Variants§
InvalidAddress
The text is not an address the courier understands.
Unsupported
The operation cannot be done on this kind of address, or on this OS.
Fields
InvalidPath
The HTTP request path is not one the courier can send.
Resolve
The host name in the address does not resolve.
Target
Reaching or talking to the target failed.
Fields
MalformedResponse
The target answered with something that is not an HTTP/1 response.
Fields
TimedOut
The operation did not finish before its deadline.
Fields
Input
Reading the operation’s input failed.
Output
Writing the operation’s output failed.
Implementations§
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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 ErrorCompat for Error
impl ErrorCompat for Error
Source§fn iter_chain(&self) -> ChainCompat<'_, '_>where
Self: AsErrorSource,
fn iter_chain(&self) -> ChainCompat<'_, '_>where
Self: AsErrorSource,
Returns an iterator for traversing the chain of errors,
starting with the current error
and continuing with recursive calls to
Error::source. Read moreAuto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl !UnwindSafe for Error
Blanket Implementations§
Source§impl<T> AsErrorSource for Twhere
T: Error + 'static,
impl<T> AsErrorSource for Twhere
T: Error + 'static,
Source§fn as_error_source(&self) -> &(dyn Error + 'static)
fn as_error_source(&self) -> &(dyn Error + 'static)
For maximum effectiveness, this needs to be called as a method
to benefit from Rust’s automatic dereferencing of method
receivers.
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