pub enum ConnectError {
ProxyRequired(TargetAddr),
Resolve {
host: String,
source: Error,
},
NoAddresses(String),
Timeout(TimeoutStage),
Connect {
addr: SocketAddr,
source: Error,
},
Socks5 {
proxy: TargetAddr,
source: Socks5Error,
},
Io(Error),
}Expand description
Errors from Connector::connect.
Variants§
ProxyRequired(TargetAddr)
The policy requires a proxy for this target but none is configured. Nothing was sent.
Resolve
Local DNS resolution failed.
NoAddresses(String)
Local DNS resolution returned no addresses.
Timeout(TimeoutStage)
A step took longer than its Timeouts entry.
Connect
The TCP connection to the target (direct) or the proxy failed.
Socks5
The SOCKS5 negotiation failed (including the proxy refusing the CONNECT).
Fields
§
proxy: TargetAddrThe proxy address (credentials are never included).
§
source: Socks5ErrorWhat went wrong.
Io(Error)
Another socket error (for example setting TCP_NODELAY).
Trait Implementations§
Source§impl Debug for ConnectError
impl Debug for ConnectError
Source§impl Display for ConnectError
impl Display for ConnectError
Source§impl Error for ConnectError
impl Error for ConnectError
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 From<ConnectError> for ClientError
impl From<ConnectError> for ClientError
Source§fn from(source: ConnectError) -> Self
fn from(source: ConnectError) -> Self
Converts to this type from the input type.
Source§impl From<Error> for ConnectError
impl From<Error> for ConnectError
Source§fn from(source: Error) -> ConnectError
fn from(source: Error) -> ConnectError
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for ConnectError
impl !UnwindSafe for ConnectError
impl Freeze for ConnectError
impl Send for ConnectError
impl Sync for ConnectError
impl Unpin for ConnectError
impl UnsafeUnpin for ConnectError
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