pub enum UnifiedAddress {
Domain {
host: String,
port: u16,
},
SocketAddress(SocketAddr),
}Expand description
The unified address which can support both IP V4, IP V6 and Domain
Variants§
Trait Implementations§
Source§impl Clone for UnifiedAddress
impl Clone for UnifiedAddress
Source§fn clone(&self) -> UnifiedAddress
fn clone(&self) -> UnifiedAddress
Returns a duplicate 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 UnifiedAddress
impl Debug for UnifiedAddress
Source§impl<'de> Deserialize<'de> for UnifiedAddress
impl<'de> Deserialize<'de> for UnifiedAddress
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<UnifiedAddress, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<UnifiedAddress, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for UnifiedAddress
impl Display for UnifiedAddress
Source§impl From<&SocketAddr> for UnifiedAddress
impl From<&SocketAddr> for UnifiedAddress
Source§fn from(value: &SocketAddr) -> UnifiedAddress
fn from(value: &SocketAddr) -> UnifiedAddress
Converts to this type from the input type.
Source§impl From<SocketAddr> for UnifiedAddress
impl From<SocketAddr> for UnifiedAddress
Source§fn from(value: SocketAddr) -> UnifiedAddress
fn from(value: SocketAddr) -> UnifiedAddress
Converts to this type from the input type.
Source§impl Hash for UnifiedAddress
impl Hash for UnifiedAddress
Source§impl PartialEq for UnifiedAddress
impl PartialEq for UnifiedAddress
Source§impl Serialize for UnifiedAddress
impl Serialize for UnifiedAddress
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Source§impl TryFrom<&UnifiedAddress> for Vec<SocketAddr>
impl TryFrom<&UnifiedAddress> for Vec<SocketAddr>
Source§type Error = ProtocolError
type Error = ProtocolError
The type returned in the event of a conversion error.
Source§fn try_from(
value: &UnifiedAddress,
) -> Result<Vec<SocketAddr>, <Vec<SocketAddr> as TryFrom<&UnifiedAddress>>::Error>
fn try_from( value: &UnifiedAddress, ) -> Result<Vec<SocketAddr>, <Vec<SocketAddr> as TryFrom<&UnifiedAddress>>::Error>
Performs the conversion.
Source§impl TryFrom<&str> for UnifiedAddress
impl TryFrom<&str> for UnifiedAddress
Source§type Error = ProtocolError
type Error = ProtocolError
The type returned in the event of a conversion error.
Source§fn try_from(
value: &str,
) -> Result<UnifiedAddress, <UnifiedAddress as TryFrom<&str>>::Error>
fn try_from( value: &str, ) -> Result<UnifiedAddress, <UnifiedAddress as TryFrom<&str>>::Error>
Performs the conversion.
Source§impl TryFrom<String> for UnifiedAddress
impl TryFrom<String> for UnifiedAddress
Source§type Error = ProtocolError
type Error = ProtocolError
The type returned in the event of a conversion error.
Source§fn try_from(
value: String,
) -> Result<UnifiedAddress, <UnifiedAddress as TryFrom<String>>::Error>
fn try_from( value: String, ) -> Result<UnifiedAddress, <UnifiedAddress as TryFrom<String>>::Error>
Performs the conversion.
Source§impl TryFrom<UnifiedAddress> for Vec<SocketAddr>
impl TryFrom<UnifiedAddress> for Vec<SocketAddr>
Source§type Error = ProtocolError
type Error = ProtocolError
The type returned in the event of a conversion error.
Source§fn try_from(
value: UnifiedAddress,
) -> Result<Vec<SocketAddr>, <Vec<SocketAddr> as TryFrom<UnifiedAddress>>::Error>
fn try_from( value: UnifiedAddress, ) -> Result<Vec<SocketAddr>, <Vec<SocketAddr> as TryFrom<UnifiedAddress>>::Error>
Performs the conversion.
impl Eq for UnifiedAddress
impl StructuralPartialEq for UnifiedAddress
Auto Trait Implementations§
impl Freeze for UnifiedAddress
impl RefUnwindSafe for UnifiedAddress
impl Send for UnifiedAddress
impl Sync for UnifiedAddress
impl Unpin for UnifiedAddress
impl UnwindSafe for UnifiedAddress
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.