Enum cap_net_ext::AddressFamily
source · pub enum AddressFamily {
Ipv4,
Ipv6,
}
Expand description
Address families supported by TcpListenerExt::new
and
UdpSocketExt::new
.
Variants§
Implementations§
source§impl AddressFamily
impl AddressFamily
sourcepub fn of_ip_addr(ip_addr: IpAddr) -> Self
pub fn of_ip_addr(ip_addr: IpAddr) -> Self
Return the AddressFamily
of an IP address.
sourcepub fn of_socket_addr(socket_addr: SocketAddr) -> Self
pub fn of_socket_addr(socket_addr: SocketAddr) -> Self
Return the AddressFamily
of a socket address.
Trait Implementations§
source§impl Clone for AddressFamily
impl Clone for AddressFamily
source§fn clone(&self) -> AddressFamily
fn clone(&self) -> AddressFamily
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 AddressFamily
impl Debug for AddressFamily
source§impl From<AddressFamily> for AddressFamily
impl From<AddressFamily> for AddressFamily
source§fn from(address_family: AddressFamily) -> Self
fn from(address_family: AddressFamily) -> Self
Converts to this type from the input type.
source§impl PartialEq<AddressFamily> for AddressFamily
impl PartialEq<AddressFamily> for AddressFamily
source§fn eq(&self, other: &AddressFamily) -> bool
fn eq(&self, other: &AddressFamily) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.