Trait Encode

Source
pub trait Encode {
    // Required method
    fn write_le(self, into: &mut [u8]);
}
Expand description

An encodable type.

Required Methods§

Source

fn write_le(self, into: &mut [u8])

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.

Implementations on Foreign Types§

Source§

impl Encode for u8

Source§

fn write_le(self, into: &mut [u8])

Source§

impl Encode for u16

Source§

fn write_le(self, into: &mut [u8])

Source§

impl Encode for u32

Source§

fn write_le(self, into: &mut [u8])

Source§

impl Encode for u64

Source§

fn write_le(self, into: &mut [u8])

Source§

impl Encode for u128

Source§

fn write_le(self, into: &mut [u8])

Implementors§