Enum std::net::IpAddr [] [src]

pub enum IpAddr {
    V4(Ipv4Addr),
    V6(Ipv6Addr),
}
1.7.0

An IP address, either an IPv4 or IPv6 address.

Variants

V4

Representation of an IPv4 address.

V6

Representation of an IPv6 address.

Trait Implementations

impl Display for IpAddr1.0.0

fn fmt(&self, fmt: &mut Formatter) -> Result

impl FromStr for IpAddr1.0.0

type Err = AddrParseError

fn from_str(s: &str) -> Result<IpAddr, AddrParseError>

Derived Implementations

impl Ord for IpAddr

fn cmp(&self, __arg_0: &IpAddr) -> Ordering

impl PartialOrd for IpAddr

fn partial_cmp(&self, __arg_0: &IpAddr) -> Option<Ordering>

fn lt(&self, __arg_0: &IpAddr) -> bool

fn le(&self, __arg_0: &IpAddr) -> bool

fn gt(&self, __arg_0: &IpAddr) -> bool

fn ge(&self, __arg_0: &IpAddr) -> bool

impl Hash for IpAddr

fn hash<__H: Hasher>(&self, __arg_0: &mut __H)

fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher1.3.0

impl Debug for IpAddr

fn fmt(&self, __arg_0: &mut Formatter) -> Result

impl PartialEq for IpAddr

fn eq(&self, __arg_0: &IpAddr) -> bool

fn ne(&self, __arg_0: &IpAddr) -> bool

impl Eq for IpAddr

impl Clone for IpAddr

fn clone(&self) -> IpAddr

fn clone_from(&mut self, source: &Self)1.0.0

impl Copy for IpAddr