Enum shadowsocks::config::ServerAddr[][src]

pub enum ServerAddr {
    SocketAddr(SocketAddr),
    DomainName(Stringu16),
}

Server address

Variants

SocketAddr(SocketAddr)

IP Address

DomainName(Stringu16)

Domain name address, eg. example.com:8080

Implementations

impl ServerAddr[src]

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

Get string representation of domain

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

Get port

Trait Implementations

impl Clone for ServerAddr[src]

impl Debug for ServerAddr[src]

impl Display for ServerAddr[src]

impl Eq for ServerAddr[src]

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

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

impl<I: Into<String>> From<(I, u16)> for ServerAddr[src]

impl From<Address> for ServerAddr[src]

impl From<ServerAddr> for Address[src]

impl From<SocketAddr> for ServerAddr[src]

impl FromStr for ServerAddr[src]

type Err = ServerAddrError

The associated error which can be returned from parsing.

impl Hash for ServerAddr[src]

impl Ord for ServerAddr[src]

impl PartialEq<ServerAddr> for ServerAddr[src]

impl PartialOrd<ServerAddr> for ServerAddr[src]

impl StructuralEq for ServerAddr[src]

impl StructuralPartialEq for ServerAddr[src]

Auto Trait Implementations

Blanket Implementations

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

impl<T> Any for T where
    T: Any

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

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

impl<T> CloneAny for T where
    T: Any + Clone

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

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

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>,