Enum std::net::IpAddr1.7.0 [] [src]

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

An IP address, either an IPv4 or IPv6 address.

Variants

V4(Ipv4Addr)

Representation of an IPv4 address.

V6(Ipv6Addr)

Representation of an IPv6 address.

Trait Implementations

impl Display for IpAddr
1.0.0
[src]

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

Formats the value using the given formatter.

impl FromStr for IpAddr
1.0.0
[src]

type Err = AddrParseError

The associated error which can be returned from parsing.

fn from_str(s: &str) -> Result<IpAddrAddrParseError>

Parses a string s to return a value of this type. Read more

Derived Implementations

impl Ord for IpAddr
[src]

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

This method returns an Ordering between self and other. Read more

impl PartialOrd for IpAddr
[src]

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

This method returns an ordering between self and other values if one exists. Read more

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

This method tests less than (for self and other) and is used by the < operator. Read more

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

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

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

This method tests greater than (for self and other) and is used by the > operator. Read more

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

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl Hash for IpAddr
[src]

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

Feeds this value into the state given, updating the hasher as necessary.

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

Feeds a slice of this type into the state provided.

impl Debug for IpAddr
[src]

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

Formats the value using the given formatter.

impl PartialEq for IpAddr
[src]

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

This method tests for self and other values to be equal, and is used by ==. Read more

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

This method tests for !=.

impl Eq for IpAddr
[src]

impl Clone for IpAddr
[src]

fn clone(&self) -> IpAddr

Returns a copy of the value. Read more

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

Performs copy-assignment from source. Read more

impl Copy for IpAddr
[src]