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§

source

type Bytes: Default + AsRef<[u8]> + AsMut<[u8]>

The little endian bytes representation.

Required Methods§

source

fn into_le_bytes(self) -> Self::Bytes

Converts self into little endian bytes.

source

fn from_le_bytes(bytes: Self::Bytes) -> Self

Converts little endian bytes into Self.

Implementations on Foreign Types§

source§

impl LittleEndianConvert for u32

source§

impl LittleEndianConvert for i32

source§

impl LittleEndianConvert for i64

source§

impl LittleEndianConvert for f64

source§

impl LittleEndianConvert for u8

source§

impl LittleEndianConvert for u16

source§

impl LittleEndianConvert for u64

source§

impl LittleEndianConvert for i8

source§

impl LittleEndianConvert for i16

source§

impl LittleEndianConvert for f32

Implementors§