Enum shadowsocks::config::ServerAddr
[−]
[src]
pub enum ServerAddr {
SocketAddr(SocketAddr),
DomainName(String, u16),
}Server address
Variants
SocketAddr(SocketAddr)IP Address
DomainName(String, u16)Domain name address, eg. example.com:8080
Methods
impl ServerAddr[src]
fn listen_addr(&self) -> &SocketAddr
Get address for server listener Panic if address is domain name
Trait Implementations
impl Clone for ServerAddr[src]
fn clone(&self) -> ServerAddr
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0
Performs copy-assignment from source. Read more
impl Debug for ServerAddr[src]
impl FromStr for ServerAddr[src]
type Err = ServerAddrError
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<ServerAddr, ServerAddrError>
Parses a string s to return a value of this type. Read more