Trait netstack3_base::LinkAddress
source · pub trait LinkAddress: 'static + FromBytes + IntoBytes + KnownLayout + Immutable + Unaligned + Copy + Clone + Debug + Eq + Send {
const BYTES_LENGTH: usize;
// Required methods
fn bytes(&self) -> &[u8] ⓘ;
fn from_bytes(bytes: &[u8]) -> Self;
}
Expand description
The type of address used by a link device.
Required Associated Constants§
sourceconst BYTES_LENGTH: usize
const BYTES_LENGTH: usize
The length of the address in bytes.
Required Methods§
sourcefn from_bytes(bytes: &[u8]) -> Self
fn from_bytes(bytes: &[u8]) -> Self
Constructs a LinkLayerAddress
from the provided bytes.
§Panics
from_bytes
may panic if bytes
is not exactly [BYTES_LENGTH
]
long.
Object Safety§
This trait is not object safe.