Struct eui48::MacAddress [] [src]

pub struct MacAddress { /* fields omitted */ }

A MAC address (EUI-48)

Methods

impl MacAddress
[src]

Create a new MacAddress from [u8; 6].

Create a new MacAddress from a byte slice.

Returns an error (without any description) if the slice doesn't have the proper length.

Returns empty EUI-48 address

Returns 'ff:ff:ff:ff:ff:ff', a MAC broadcast address

Returns true if the address is '00:00:00:00:00:00'

Returns true if the address is 'ff:ff:ff:ff:ff:ff'

Returns true if bit 1 of Y is 1 in address 'xY:xx:xx:xx:xx:xx'

Returns true if bit 1 of Y is 1 in address 'xY:xx:xx:xx:xx:xx'

Returns true if bit 2 of Y is 0 in address 'xY:xx:xx:xx:xx:xx'

Returns true if bit 2 of Y is 1 in address 'xY:xx:xx:xx:xx:xx'

Returns a String representation in the format '00-00-00-00-00-00'

Returns a String representation in the format '00:00:00:00:00:00'

Returns a String representation in the format '0000.0000.0000'

Returns a String representation in the format '0x000000000000'

Returns a String in the format selected by fmt

Parses a String representation from any format supported

Return the internal structure as a slice of bytes

Trait Implementations

impl Copy for MacAddress
[src]

impl Clone for MacAddress
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl FromStr for MacAddress
[src]

The associated error which can be returned from parsing.

Create a MacAddress from String

impl Default for MacAddress
[src]

Create a Default MacAddress (00-00-00-00-00-00)

impl Debug for MacAddress
[src]

Debug format for MacAddress is HexString notation

impl Display for MacAddress
[src]

Display format is canonical format (00-00-00-00-00-00)

impl PartialEq for MacAddress
[src]

Define PartialEq as eui equal

This method tests for !=.

impl Eq for MacAddress
[src]

impl Ord for MacAddress
[src]

This method returns an Ordering between self and other. Read more

impl PartialOrd for MacAddress
[src]

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl Encodable for MacAddress
[src]

Encode a MacAddress as canonical form

impl Decodable for MacAddress
[src]

Decode a MacAddress from a string in canonical form