Struct eui48::MacAddress [] [src]

pub struct MacAddress { /* fields omitted */ }

A MAC address (EUI-48)

Methods

impl MacAddress
[src]

[src]

Create a new MacAddress from [u8; 6].

[src]

Create a new MacAddress from a byte slice.

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

[src]

Returns empty EUI-48 address

[src]

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

[src]

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

[src]

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

[src]

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

[src]

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

[src]

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

[src]

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

[src]

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

[src]

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

[src]

Returns a String representation in the format '0000.0000.0000'

[src]

Returns a String representation in the format '0x000000000000'

[src]

Returns a String in the format selected by fmt

[src]

Parses a String representation from any format supported

[src]

Return the internal structure as a slice of bytes

Trait Implementations

impl Copy for MacAddress
[src]

impl Clone for MacAddress
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Hash for MacAddress
[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 Eq for MacAddress
[src]

impl PartialEq for MacAddress
[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 Ord for MacAddress
[src]

[src]

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

1.22.0
[src]

Compares and returns the maximum of two values. Read more

1.22.0
[src]

Compares and returns the minimum of two values. Read more

impl PartialOrd for MacAddress
[src]

[src]

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

[src]

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

[src]

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

[src]

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

[src]

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

impl FromStr for MacAddress
[src]

The associated error which can be returned from parsing.

[src]

Create a MacAddress from String

impl Default for MacAddress
[src]

[src]

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

impl Debug for MacAddress
[src]

[src]

Debug format for MacAddress is HexString notation

impl Display for MacAddress
[src]

[src]

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

impl Encodable for MacAddress
[src]

[src]

Encode a MacAddress as canonical form

impl Decodable for MacAddress
[src]

[src]

Decode a MacAddress from a string in canonical form