[][src]Enum shadowsocks::relay::socks5::Address

pub enum Address {
    SocketAddress(SocketAddr),
    DomainNameAddress(Stringu16),
}

SOCKS5 address type

Variants

SocketAddress(SocketAddr)

Socket address (IP Address)

DomainNameAddress(Stringu16)

Domain name address

Implementations

impl Address[src]

pub async fn read_from<R, '_>(stream: &'_ mut R) -> Result<Address, Error> where
    R: AsyncRead + Unpin
[src]

Parse from a AsyncRead

pub async fn write_to<W, '_, '_>(&'_ self, writer: &'_ mut W) -> Result<()> where
    W: AsyncWrite + Unpin
[src]

Writes to writer

pub fn write_to_buf<B: BufMut>(&self, buf: &mut B)[src]

Writes to buffer

pub fn serialized_len(&self) -> usize[src]

Get required buffer size for serializing

pub fn port(&self) -> u16[src]

Get associated port number

pub fn host(&self) -> String[src]

Get host address string

Trait Implementations

impl Clone for Address[src]

impl Debug for Address[src]

impl Display for Address[src]

impl Eq for Address[src]

impl<'_> From<&'_ Address> for Address[src]

impl From<(String, u16)> for Address[src]

impl From<Address> for Address[src]

impl From<SocketAddr> for Address[src]

impl FromStr for Address[src]

type Err = AddressError

The associated error which can be returned from parsing.

impl Hash for Address[src]

impl PartialEq<Address> for Address[src]

impl StructuralEq for Address[src]

impl StructuralPartialEq for Address[src]

impl ToSocketAddrs for Address[src]

type Iter = IntoIter<SocketAddr>

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

Auto Trait Implementations

impl RefUnwindSafe for Address

impl Send for Address

impl Sync for Address

impl Unpin for Address

impl UnwindSafe for Address

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<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

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

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

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

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,