Enum socks::TargetAddr
source · [−]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.
Trait Implementations
sourceimpl Clone for TargetAddr
impl Clone for TargetAddr
sourcefn clone(&self) -> TargetAddr
fn clone(&self) -> TargetAddr
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for TargetAddr
impl Debug for TargetAddr
sourceimpl ToSocketAddrs for TargetAddr
impl ToSocketAddrs for TargetAddr
type Iter = Iter
type Iter = Iter
Returned iterator over socket addresses which this type may correspond to. Read more
sourcefn to_socket_addrs(&self) -> Result<Iter>
fn to_socket_addrs(&self) -> Result<Iter>
Converts this object to an iterator of resolved SocketAddr
s. Read more
sourceimpl ToTargetAddr for TargetAddr
impl ToTargetAddr for TargetAddr
sourcefn 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 RefUnwindSafe for TargetAddr
impl Send for TargetAddr
impl Sync for TargetAddr
impl Unpin for TargetAddr
impl UnwindSafe for TargetAddr
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more