Trait little_endian::Encode [] [src]

pub trait Encode {
    fn read_le(from: &[u8]) -> Self;
    fn write_le(self, into: &mut [u8]);
}

An encodable/decodable type.

Required Methods

Read an integer in little-endian format.

This reads the first n bytes (depending on the size of Self) of from in little-endian (least significant byte first).

Panics

This will potentially panic if from is not large enough.

Write an integer in little-endian format.

This writes self into the first n bytes (depending on the size of Self) of into in little-endian format (least significant byte first).

Panics

This will potentially panic if into is not large enough.

Implementors