pub trait LittleEndianConvert {
type Bytes: Default + AsRef<[u8]> + AsMut<[u8]>;
// Required methods
fn into_le_bytes(self) -> Self::Bytes;
fn from_le_bytes(bytes: Self::Bytes) -> Self;
}Expand description
Types that can be converted from and to little endian bytes.
Required Associated Types§
Required Methods§
Sourcefn into_le_bytes(self) -> Self::Bytes
fn into_le_bytes(self) -> Self::Bytes
Converts self into little endian bytes.
Sourcefn from_le_bytes(bytes: Self::Bytes) -> Self
fn from_le_bytes(bytes: Self::Bytes) -> Self
Converts little endian bytes into Self.
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.