pub enum TargetAddr {
Ip(SocketAddr),
Domain(String, u16),
}Expand description
A description of a connection target.
Variants§
Ip(SocketAddr)
Connect to an IP address.
Domain(String, u16)
Connect to a fully qualified domain name.
The domain name will be passed along to the proxy server and DNS lookup will happen there.
Implementations§
Trait Implementations§
Source§impl Clone for TargetAddr
impl Clone for TargetAddr
Source§impl Debug for TargetAddr
impl Debug for TargetAddr
Source§impl Display for TargetAddr
impl Display for TargetAddr
impl Eq for TargetAddr
Source§impl Hash for TargetAddr
impl Hash for TargetAddr
Source§impl PartialEq for TargetAddr
impl PartialEq for TargetAddr
impl StructuralPartialEq for TargetAddr
Source§impl ToSocketAddrs for TargetAddr
The blocking ToSocketAddrs form: IP targets resolve directly;
domain targets cannot be resolved here (domain resolution is the
egress’s job — ADR-012) and error.
impl ToSocketAddrs for TargetAddr
The blocking ToSocketAddrs form: IP targets resolve directly;
domain targets cannot be resolved here (domain resolution is the
egress’s job — ADR-012) and error.
Source§type Iter = IntoIter<SocketAddr>
type Iter = IntoIter<SocketAddr>
Returned iterator over socket addresses which this type may correspond
to.
Source§fn to_socket_addrs(&self) -> Result<IntoIter<SocketAddr>>
fn to_socket_addrs(&self) -> Result<IntoIter<SocketAddr>>
Converts this object to an iterator of resolved
SocketAddrs. Read moreSource§impl ToTargetAddr for TargetAddr
impl ToTargetAddr for TargetAddr
Source§fn to_target_addr(&self) -> Result<TargetAddr>
fn to_target_addr(&self) -> Result<TargetAddr>
Converts the value of
self to a TargetAddr.Source§impl ToTargetAddr for &TargetAddr
impl ToTargetAddr for &TargetAddr
Source§fn to_target_addr(&self) -> Result<TargetAddr>
fn to_target_addr(&self) -> Result<TargetAddr>
Converts the value of
self to a TargetAddr.Auto Trait Implementations§
impl Freeze for TargetAddr
impl RefUnwindSafe for TargetAddr
impl Send for TargetAddr
impl Sync for TargetAddr
impl Unpin for TargetAddr
impl UnsafeUnpin for TargetAddr
impl UnwindSafe for TargetAddr
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.