Enum shadowsocks::config::ServerAddr
source · pub enum ServerAddr {
SocketAddr(SocketAddr),
DomainName(String, u16),
}
Expand description
Server address
Variants§
Implementations§
Trait Implementations§
source§impl Clone for ServerAddr
impl Clone for ServerAddr
source§fn clone(&self) -> ServerAddr
fn clone(&self) -> ServerAddr
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ServerAddr
impl Debug for ServerAddr
source§impl Display for ServerAddr
impl Display for ServerAddr
source§impl From<&Address> for ServerAddr
impl From<&Address> for ServerAddr
source§fn from(addr: &Address) -> ServerAddr
fn from(addr: &Address) -> ServerAddr
Converts to this type from the input type.
source§impl From<&ServerAddr> for Address
impl From<&ServerAddr> for Address
source§fn from(addr: &ServerAddr) -> Address
fn from(addr: &ServerAddr) -> Address
Converts to this type from the input type.
source§impl<I: Into<String>> From<(I, u16)> for ServerAddr
impl<I: Into<String>> From<(I, u16)> for ServerAddr
source§fn from((dname, port): (I, u16)) -> ServerAddr
fn from((dname, port): (I, u16)) -> ServerAddr
Converts to this type from the input type.
source§impl From<Address> for ServerAddr
impl From<Address> for ServerAddr
source§fn from(addr: Address) -> ServerAddr
fn from(addr: Address) -> ServerAddr
Converts to this type from the input type.
source§impl From<ServerAddr> for Address
impl From<ServerAddr> for Address
source§fn from(addr: ServerAddr) -> Address
fn from(addr: ServerAddr) -> Address
Converts to this type from the input type.
source§impl From<SocketAddr> for ServerAddr
impl From<SocketAddr> for ServerAddr
source§fn from(addr: SocketAddr) -> ServerAddr
fn from(addr: SocketAddr) -> ServerAddr
Converts to this type from the input type.
source§impl FromStr for ServerAddr
impl FromStr for ServerAddr
§type Err = ServerAddrError
type Err = ServerAddrError
The associated error which can be returned from parsing.
source§fn from_str(s: &str) -> Result<ServerAddr, ServerAddrError>
fn from_str(s: &str) -> Result<ServerAddr, ServerAddrError>
Parses a string
s
to return a value of this type. Read moresource§impl Hash for ServerAddr
impl Hash for ServerAddr
source§impl Ord for ServerAddr
impl Ord for ServerAddr
source§fn cmp(&self, other: &ServerAddr) -> Ordering
fn cmp(&self, other: &ServerAddr) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for ServerAddr
impl PartialEq for ServerAddr
source§fn eq(&self, other: &ServerAddr) -> bool
fn eq(&self, other: &ServerAddr) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for ServerAddr
impl PartialOrd for ServerAddr
source§fn partial_cmp(&self, other: &ServerAddr) -> Option<Ordering>
fn partial_cmp(&self, other: &ServerAddr) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq for ServerAddr
impl StructuralPartialEq for ServerAddr
Auto Trait Implementations§
impl RefUnwindSafe for ServerAddr
impl Send for ServerAddr
impl Sync for ServerAddr
impl Unpin for ServerAddr
impl UnwindSafe for ServerAddr
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more