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.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.