[][src]Enum tokio_socks::TargetAddr

pub enum TargetAddr<'a> {
    Ip(SocketAddr),
    Domain(Cow<'a, str>, u16),
}

A SOCKS connection target.

Variants

Connect to an IP address.

Domain(Cow<'a, str>, 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

impl<'a> TargetAddr<'a>[src]

pub fn to_owned(&self) -> TargetAddr<'static>[src]

Creates owned TargetAddr by cloning. It is usually used to eliminate the lifetime bound.

Trait Implementations

impl<'a> Debug for TargetAddr<'a>[src]

impl<'a> Eq for TargetAddr<'a>[src]

impl<'a> IntoTargetAddr<'a> for TargetAddr<'a>[src]

impl<'a> PartialEq<TargetAddr<'a>> for TargetAddr<'a>[src]

impl<'a> StructuralEq for TargetAddr<'a>[src]

impl<'a> StructuralPartialEq for TargetAddr<'a>[src]

impl<'a> ToSocketAddrs for TargetAddr<'a>[src]

type Iter = Either<IntoIter<SocketAddr>, IntoIter<SocketAddr>>

Returned iterator over socket addresses which this type may correspond to. Read more

Auto Trait Implementations

impl<'a> RefUnwindSafe for TargetAddr<'a>

impl<'a> Send for TargetAddr<'a>

impl<'a> Sync for TargetAddr<'a>

impl<'a> Unpin for TargetAddr<'a>

impl<'a> UnwindSafe for TargetAddr<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.