Enum inet2_addr::InetSocketAddr
source · #[non_exhaustive]
pub enum InetSocketAddr {
IPv4(SocketAddrV4),
IPv6(SocketAddrV6),
}
Expand description
Internet socket address, which consists of InetAddr
IP or Tor address
and a port number (without protocol specification, i.e. TCP/UDP etc). If you
need to include transport-level protocol information into the socket
details, pls check InetSocketAddrExt
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
IPv4(SocketAddrV4)
IP socket address of V4 standard
IPv6(SocketAddrV6)
IP socket address of V6 standard
Implementations§
Trait Implementations§
source§impl Clone for InetSocketAddr
impl Clone for InetSocketAddr
source§fn clone(&self) -> InetSocketAddr
fn clone(&self) -> InetSocketAddr
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 InetSocketAddr
impl Debug for InetSocketAddr
source§impl Default for InetSocketAddr
impl Default for InetSocketAddr
source§impl Display for InetSocketAddr
impl Display for InetSocketAddr
source§impl From<InetSocketAddr> for PartialSocketAddr
impl From<InetSocketAddr> for PartialSocketAddr
source§fn from(addr: InetSocketAddr) -> Self
fn from(addr: InetSocketAddr) -> Self
Converts to this type from the input type.
source§impl From<InetSocketAddr> for ServerAddr
impl From<InetSocketAddr> for ServerAddr
source§fn from(v: InetSocketAddr) -> Self
fn from(v: InetSocketAddr) -> Self
Converts to this type from the input type.
source§impl From<InetSocketAddr> for SocketAddr
impl From<InetSocketAddr> for SocketAddr
source§fn from(socket_addr: InetSocketAddr) -> Self
fn from(socket_addr: InetSocketAddr) -> Self
Converts to this type from the input type.
source§impl From<SocketAddr> for InetSocketAddr
impl From<SocketAddr> for InetSocketAddr
source§fn from(socket: SocketAddr) -> Self
fn from(socket: SocketAddr) -> Self
Converts to this type from the input type.
source§impl From<SocketAddrV4> for InetSocketAddr
impl From<SocketAddrV4> for InetSocketAddr
source§fn from(v: SocketAddrV4) -> Self
fn from(v: SocketAddrV4) -> Self
Converts to this type from the input type.
source§impl From<SocketAddrV6> for InetSocketAddr
impl From<SocketAddrV6> for InetSocketAddr
source§fn from(v: SocketAddrV6) -> Self
fn from(v: SocketAddrV6) -> Self
Converts to this type from the input type.
source§impl FromStr for InetSocketAddr
impl FromStr for InetSocketAddr
source§impl Hash for InetSocketAddr
impl Hash for InetSocketAddr
source§impl Ord for InetSocketAddr
impl Ord for InetSocketAddr
source§impl PartialEq<InetSocketAddr> for InetSocketAddr
impl PartialEq<InetSocketAddr> for InetSocketAddr
source§fn eq(&self, other: &InetSocketAddr) -> bool
fn eq(&self, other: &InetSocketAddr) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<InetSocketAddr> for InetSocketAddr
impl PartialOrd<InetSocketAddr> for InetSocketAddr
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 more