pub enum Error {
InvalidUrl {
url: String,
source: ParseError,
backtrace: Backtrace,
},
UnknownScheme {
scheme: String,
backtrace: Backtrace,
},
MalformedUrl {
scheme: String,
url: String,
reason: &'static str,
backtrace: Backtrace,
},
Closed {
backtrace: Backtrace,
},
Io {
source: Error,
backtrace: Backtrace,
},
BufferTooSmall {
needed: usize,
backtrace: Backtrace,
},
MockDrop {
backtrace: Backtrace,
},
Unsupported {
op: &'static str,
scheme: String,
backtrace: Backtrace,
},
}Variants§
InvalidUrl
The transport URL could not be parsed.
UnknownScheme
The URL scheme is not registered with any transport kind.
MalformedUrl
The URL was structurally valid but missing a part this scheme requires (host, port, path, etc.).
Closed
The peer closed the transport cleanly.
Io
A transport implementation reported an I/O-level failure (connect refused, handshake abort, mid-stream protocol error). The transport is unusable after this.
BufferTooSmall
The receive buffer was smaller than the next queued message. The caller should retry with a larger buffer. The required size is reported so the caller can size accordingly.
MockDrop
The mock transport was configured to simulate a dropped message.
Unsupported
A built-in transport rejected an operation it does not support
(e.g. listen on a client-only transport).
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)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl ErrorCompat for Error
impl ErrorCompat for Error
§fn iter_chain(&self) -> ChainCompat<'_, '_>where
Self: AsErrorSource,
fn iter_chain(&self) -> ChainCompat<'_, '_>where
Self: AsErrorSource,
Error::source. Read more