Enum std::net::IpAddrUnstable [-] [+] [src]

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

Enumeration of possible IP addresses

Variants

V4

An IPv4 address.

V6

An IPv6 address.

Methods

impl IpAddr

fn new_v4(a: u8, b: u8, c: u8, d: u8) -> IpAddr

Create a new IpAddr that contains an IPv4 address.

The result will represent the IP address a.b.c.d

fn new_v6(a: u16, b: u16, c: u16, d: u16, e: u16, f: u16, g: u16, h: u16) -> IpAddr

Create a new IpAddr that contains an IPv6 address.

The result will represent the IP address a:b:c:d:e:f

Trait Implementations

impl Display for IpAddr

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

impl FromStr for IpAddr

type Err = ParseError

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

Derived Implementations

impl Debug for IpAddr

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

impl Hash for IpAddr

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

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

impl Clone for IpAddr

fn clone(&self) -> IpAddr

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

impl Eq for IpAddr

impl PartialEq for IpAddr

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

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

impl Copy for IpAddr