Struct get_if_addrs::Interface [] [src]

pub struct Interface {
    pub name: String,
    pub addr: IfAddr,
}

Details about an interface on this host

Fields

name: String

The name of the interface.

addr: IfAddr

The address details of the interface.

Methods

impl Interface
[src]

fn is_loopback(&self) -> bool

Check whether this is a loopback interface.

fn ip(&self) -> IpAddr

Get the IP address of this interface.

Trait Implementations

impl Clone for Interface
[src]

fn clone(&self) -> Interface

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 Interface
[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 Interface
[src]

impl PartialEq for Interface
[src]

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

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

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

This method tests for !=.

impl Debug for Interface
[src]

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

Formats the value using the given formatter.