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<'de> Deserialize<'de> for ServerAddr
impl<'de> Deserialize<'de> for ServerAddr
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
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
Source§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§impl PartialOrd for ServerAddr
impl PartialOrd for ServerAddr
Source§impl Serialize for ServerAddr
impl Serialize for ServerAddr
impl Eq for ServerAddr
impl StructuralPartialEq for ServerAddr
Auto Trait Implementations§
impl Freeze for ServerAddr
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