[][src]Enum if_addrs::IfAddr

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

Details about the address of an interface on this host.

Variants

This is an Ipv4 interface.

This is an Ipv6 interface.

Implementations

impl IfAddr[src]

pub fn is_loopback(&self) -> bool[src]

Check whether this is a loopback address.

pub fn ip(&self) -> IpAddr[src]

Get the IP address of this interface address.

Trait Implementations

impl Clone for IfAddr[src]

impl Debug for IfAddr[src]

impl Eq for IfAddr[src]

impl Hash for IfAddr[src]

impl PartialEq<IfAddr> for IfAddr[src]

impl StructuralEq for IfAddr[src]

impl StructuralPartialEq for IfAddr[src]

Auto Trait Implementations

impl RefUnwindSafe for IfAddr

impl Send for IfAddr

impl Sync for IfAddr

impl Unpin for IfAddr

impl UnwindSafe for IfAddr

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.