#[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
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.
Io(Error)
The TCP socket failed to bind, accept, or connect.
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)>
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 Error
impl !UnwindSafe for Error
impl Freeze for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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