Struct hwaddr::HwAddr
[−]
[src]
pub struct HwAddr { /* fields omitted */ }
A MAC address.
Methods
impl HwAddr
[src]
fn octets(&self) -> [u8; 6]
[src]
Get the octets composing the MAC address.
Example
use hwaddr::HwAddr; assert_eq!( "00-14-22-01-23-45".parse::<HwAddr>().unwrap().octets(), [0, 20, 34, 1, 35, 69]);
fn is_broadcast(&self) -> bool
[src]
Checks if the address is broadcast.
Example
use hwaddr::HwAddr; assert!("FF:FF:FF:FF:FF:FF".parse::<HwAddr>().unwrap().is_broadcast()); assert!(!"00:00:00:00:00:00".parse::<HwAddr>().unwrap().is_broadcast());
fn producer(&self) -> Option<&Producer>
[src]
Tries to find the producer for this MAC address.
Trait Implementations
impl Copy for HwAddr
[src]
impl Clone for HwAddr
[src]
fn clone(&self) -> HwAddr
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Eq for HwAddr
[src]
impl PartialEq for HwAddr
[src]
fn eq(&self, __arg_0: &HwAddr) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &HwAddr) -> bool
[src]
This method tests for !=
.
impl Hash for HwAddr
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
[src]
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Debug for HwAddr
[src]
impl FromStr for HwAddr
[src]
type Err = ParseIntError
The associated error which can be returned from parsing.
fn from_str(value: &str) -> Result<Self, Self::Err>
[src]
Parses a string s
to return a value of this type. Read more