pub trait Base {
type Bytes;
const LEN: usize;
// Required methods
fn to_le_bytes(&self) -> Self::Bytes;
fn from_le_bytes(bytes: Self::Bytes) -> Self;
fn bytes_to_slice(bytes: &Self::Bytes) -> &[u8] ⓘ;
unsafe fn slice_to_bytes(slice: &[u8]) -> Self::Bytes;
}
Required Associated Constants§
Required Associated Types§
Required Methods§
fn to_le_bytes(&self) -> Self::Bytes
fn from_le_bytes(bytes: Self::Bytes) -> Self
fn bytes_to_slice(bytes: &Self::Bytes) -> &[u8] ⓘ
unsafe fn slice_to_bytes(slice: &[u8]) -> Self::Bytes
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.