Struct pnet_base::MacAddr[][src]

pub struct MacAddr(pub u8, pub u8, pub u8, pub u8, pub u8, pub u8);

A MAC address

Implementations

impl MacAddr[src]

pub fn new(a: u8, b: u8, c: u8, d: u8, e: u8, f: u8) -> MacAddr[src]

Construct a new MacAddr

pub fn zero() -> MacAddr[src]

Construct an all-zero MacAddr

pub fn broadcast() -> MacAddr[src]

Construct a broadcast MacAddr

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

Returns true if the MacAddr is an all-zero address

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

Returns true if the MacAddr is a universally administered addresses (UAA)

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

Returns true if the MacAddr is a locally administered addresses (LAA)

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

Returns true if the MacAddr is a unicast address

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

Returns true if the MacAddr is a multicast address

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

Returns true if the MacAddr is a broadcast address

Trait Implementations

impl Clone for MacAddr[src]

impl Copy for MacAddr[src]

impl Debug for MacAddr[src]

impl Default for MacAddr[src]

impl Display for MacAddr[src]

impl Eq for MacAddr[src]

impl From<[u8; 6]> for MacAddr[src]

impl FromStr for MacAddr[src]

type Err = ParseMacAddrErr

The associated error which can be returned from parsing.

impl Hash for MacAddr[src]

impl Ord for MacAddr[src]

impl PartialEq<[u8; 6]> for MacAddr[src]

impl PartialEq<MacAddr> for MacAddr[src]

impl PartialOrd<MacAddr> for MacAddr[src]

impl StructuralEq for MacAddr[src]

impl StructuralPartialEq for MacAddr[src]

Auto Trait Implementations

impl RefUnwindSafe for MacAddr

impl Send for MacAddr

impl Sync for MacAddr

impl Unpin for MacAddr

impl UnwindSafe for MacAddr

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> ToString for T where
    T: Display + ?Sized
[src]

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.