Trait blockbuffers::le::LE

source ·
pub trait LE: Sized {
    fn to_le(self) -> Self;
    fn from_le(x: Self) -> Self;

    fn from_le_slice(bytes: &[u8]) -> Self { ... }
}
Expand description

The trait LE converts between native endian and little endian.

Required Methods

Converts a value in native endian to little endian.

Converts a value in little endian to native endian.

Provided Methods

Reads from slice in little endian form.

Examples
use blockbuffers::le::LE;

assert_eq!(1u16, u16::from_le_slice(&[1u8, 0]));

Implementations on Foreign Types

Implementors