Struct hwaddr::HwAddr [] [src]

pub struct HwAddr { /* fields omitted */ }

A MAC address.

Methods

impl HwAddr
[src]

[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]);

[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());

[src]

Tries to find the producer for this MAC address.

Trait Implementations

impl Copy for HwAddr
[src]

impl Clone for HwAddr
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Eq for HwAddr
[src]

impl PartialEq for HwAddr
[src]

[src]

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

[src]

This method tests for !=.

impl Hash for HwAddr
[src]

[src]

Feeds this value into the given [Hasher]. Read more

1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl Debug for HwAddr
[src]

[src]

Formats the value using the given formatter.

impl FromStr for HwAddr
[src]

The associated error which can be returned from parsing.

[src]

Parses a string s to return a value of this type. Read more

impl From<u32> for HwAddr
[src]

[src]

Performs the conversion.

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

[src]

Performs the conversion.

impl<'a> From<&'a [u8]> for HwAddr
[src]

[src]

Performs the conversion.

impl Display for HwAddr
[src]

[src]

Formats the value using the given formatter. Read more