Struct inet2_addr::InetSocketAddrExt
source · pub struct InetSocketAddrExt(pub Transport, pub InetSocketAddr);
Expand description
Internet socket address of InetSocketAddr
type, extended with a
transport-level protocol information (see Transport
)
Tuple Fields§
§0: Transport
Transport-level protocol details (like TCP, UDP etc)
1: InetSocketAddr
Details of the socket address, i.e internet address and port information
Implementations§
source§impl InetSocketAddrExt
impl InetSocketAddrExt
sourcepub fn tcp(socket: SocketAddr) -> Self
pub fn tcp(socket: SocketAddr) -> Self
Constructs InetSocketAddrExt
for a given socket address and TCP
port
sourcepub fn udp(address: IpAddr, port: u16) -> Self
pub fn udp(address: IpAddr, port: u16) -> Self
Constructs InetSocketAddrExt
for a given internet address and UDP
port
Trait Implementations§
source§impl Clone for InetSocketAddrExt
impl Clone for InetSocketAddrExt
source§fn clone(&self) -> InetSocketAddrExt
fn clone(&self) -> InetSocketAddrExt
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 InetSocketAddrExt
impl Debug for InetSocketAddrExt
source§impl Default for InetSocketAddrExt
impl Default for InetSocketAddrExt
source§fn default() -> InetSocketAddrExt
fn default() -> InetSocketAddrExt
Returns the “default value” for a type. Read more
source§impl Display for InetSocketAddrExt
impl Display for InetSocketAddrExt
source§impl FromStr for InetSocketAddrExt
impl FromStr for InetSocketAddrExt
source§impl Hash for InetSocketAddrExt
impl Hash for InetSocketAddrExt
source§impl Ord for InetSocketAddrExt
impl Ord for InetSocketAddrExt
source§fn cmp(&self, other: &InetSocketAddrExt) -> Ordering
fn cmp(&self, other: &InetSocketAddrExt) -> 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<InetSocketAddrExt> for InetSocketAddrExt
impl PartialEq<InetSocketAddrExt> for InetSocketAddrExt
source§fn eq(&self, other: &InetSocketAddrExt) -> bool
fn eq(&self, other: &InetSocketAddrExt) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<InetSocketAddrExt> for InetSocketAddrExt
impl PartialOrd<InetSocketAddrExt> for InetSocketAddrExt
source§fn partial_cmp(&self, other: &InetSocketAddrExt) -> Option<Ordering>
fn partial_cmp(&self, other: &InetSocketAddrExt) -> 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 more