Enum get_if_addrs::IfAddr [] [src]

pub enum IfAddr {
    V4(Ifv4Addr),
    V6(Ifv6Addr),
}

Details about the address of an interface on this host

Variants

V4(Ifv4Addr)

This is an Ipv4 interface.

V6(Ifv6Addr)

This is an Ipv6 interface.

Methods

impl IfAddr
[src]

fn is_loopback(&self) -> bool

Check whether this is a loopback address.

fn ip(&self) -> IpAddr

Get the IP address of this interface address.

Trait Implementations

impl Clone for IfAddr
[src]

fn clone(&self) -> IfAddr

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 Hash for IfAddr
[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 Eq for IfAddr
[src]

impl PartialEq for IfAddr
[src]

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

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

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

This method tests for !=.

impl Debug for IfAddr
[src]

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

Formats the value using the given formatter.