Struct smoltcp::wire::EthernetAddress
[−]
[src]
pub struct EthernetAddress(pub [u8; 6]);
A six-octet Ethernet II address.
Methods
impl Address
[src]
fn from_bytes(data: &[u8]) -> Address
[src]
Construct an Ethernet address from a sequence of octets, in big-endian.
Panics
The function panics if data
is not six octets long.
fn as_bytes(&self) -> &[u8]
[src]
Return an Ethernet address as a sequence of octets, in big-endian.
fn is_unicast(&self) -> bool
[src]
Query whether the address is an unicast address.
fn is_broadcast(&self) -> bool
[src]
Query whether this address is the broadcast address.
fn is_multicast(&self) -> bool
[src]
Query whether the "multicast" bit in the OUI is set.
fn is_local(&self) -> bool
[src]
Query whether the "locally administered" bit in the OUI is set.
Trait Implementations
impl FromStr for EthernetAddress
[src]
type Err = ()
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<EthernetAddress, ()>
[src]
Parse a string representation of an Ethernet address.
impl Debug for Address
[src]
impl PartialEq for Address
[src]
fn eq(&self, __arg_0: &Address) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Address) -> bool
[src]
This method tests for !=
.
impl Eq for Address
[src]
impl PartialOrd for Address
[src]
fn partial_cmp(&self, __arg_0: &Address) -> Option<Ordering>
[src]
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, __arg_0: &Address) -> bool
[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, __arg_0: &Address) -> bool
[src]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, __arg_0: &Address) -> bool
[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, __arg_0: &Address) -> bool
[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Ord for Address
[src]
fn cmp(&self, __arg_0: &Address) -> Ordering
[src]
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.22.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.22.0[src]
Compares and returns the minimum of two values. Read more
impl Clone for Address
[src]
fn clone(&self) -> Address
[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