#[repr(C)]
pub struct MacAddress { /* fields omitted */ }
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 0 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 representation in the EUI-64 interface ID format '0000:00ff:fe00:0000'
Returns a String representation in the IPv6 link local format 'ff80::0000:00ff:fe00:0000'
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
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
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self | 1.21.0 [src] |
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self | 1.21.0 [src] |
Compares and returns the minimum of two values. Read more
Performs copy-assignment from source
. Read more
This method tests for self
and other
values to be equal, and is used by ==
. Read more
This method tests for !=
.
Create a Default MacAddress (00-00-00-00-00-00)
Debug format for MacAddress is HexString notation
Feeds this value into the given [Hasher
]. Read more
Feeds a slice of this type into the given [Hasher
]. Read more
Display format is canonical format (00-00-00-00-00-00)
The associated error which can be returned from parsing.
Create a MacAddress from String
Encode a MacAddress as canonical form
Decode a MacAddress from a string in canonical form
Converts the given value to a String
. Read more
Creates owned data from borrowed data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)