#[non_exhaustive]pub enum Error {
Io(Error),
MissingHostname,
MissingPort,
Connect(Error),
Accept(Error),
NoAddresses,
Failover(Vec<Failure<Error>>),
}Expand description
Errors specific to the plain-TCP qmux transport.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Io(Error)
The TCP socket failed to bind or connect, or the host failed to resolve. Not
accept: a failed accept(2) is the listener’s own to classify and retry
(see crate::accept).
MissingHostname
The tcp:// URL had no host.
MissingPort
The tcp:// URL had no port. Unlike https, there is no default.
Connect(Error)
The qmux handshake failed while dialing.
Accept(Error)
The qmux handshake failed while accepting.
NoAddresses
DNS resolved the host to no addresses at all.
Failover(Vec<Failure<Error>>)
Two or more addresses were raced and every attempt failed, each paired with its own error in dial order. All of them are kept: picking one to report would bury a refused port behind whichever address happened to be unroutable or to blackhole until its timeout. A host with a single address reports that error directly instead.
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()