EncodeLe

Trait EncodeLe 

Source
pub trait EncodeLe {
    // Required methods
    fn encode_offset<T>(
        &self,
        target: &mut [u8],
        ctx: &mut T,
        offset: &mut usize,
        bits: usize,
    );
    fn bits_with_user_define(&self, bits: Option<usize>) -> usize;

    // Provided methods
    fn encode<T>(&self, target: &mut [u8], ctx: &mut T) { ... }
    fn bits(&self) -> usize { ... }
}

Required Methods§

Source

fn encode_offset<T>( &self, target: &mut [u8], ctx: &mut T, offset: &mut usize, bits: usize, )

Source

fn bits_with_user_define(&self, bits: Option<usize>) -> usize

Provided Methods§

Source

fn encode<T>(&self, target: &mut [u8], ctx: &mut T)

Source

fn bits(&self) -> usize

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.

Implementations on Foreign Types§

Source§

impl EncodeLe for bool

Source§

fn encode_offset<T>( &self, target: &mut [u8], _ctx: &mut T, offset: &mut usize, _bits: usize, )

Source§

fn bits_with_user_define(&self, _bits: Option<usize>) -> usize

Source§

impl EncodeLe for f32

Source§

fn encode_offset<T>( &self, target: &mut [u8], _ctx: &mut T, offset: &mut usize, _bits: usize, )

Source§

fn bits_with_user_define(&self, bits: Option<usize>) -> usize

Source§

impl EncodeLe for f64

Source§

fn encode_offset<T>( &self, target: &mut [u8], _ctx: &mut T, offset: &mut usize, _bits: usize, )

Source§

fn bits_with_user_define(&self, bits: Option<usize>) -> usize

Source§

impl EncodeLe for i8

Source§

fn encode_offset<T>( &self, target: &mut [u8], _ctx: &mut T, offset: &mut usize, bits: usize, )

Source§

fn bits_with_user_define(&self, bits: Option<usize>) -> usize

Source§

impl EncodeLe for i16

Source§

fn encode_offset<T>( &self, target: &mut [u8], _ctx: &mut T, offset: &mut usize, bits: usize, )

Source§

fn bits_with_user_define(&self, bits: Option<usize>) -> usize

Source§

impl EncodeLe for i32

Source§

fn encode_offset<T>( &self, target: &mut [u8], _ctx: &mut T, offset: &mut usize, bits: usize, )

Source§

fn bits_with_user_define(&self, bits: Option<usize>) -> usize

Source§

impl EncodeLe for i64

Source§

fn encode_offset<T>( &self, target: &mut [u8], _ctx: &mut T, offset: &mut usize, bits: usize, )

Source§

fn bits_with_user_define(&self, bits: Option<usize>) -> usize

Source§

impl EncodeLe for i128

Source§

fn encode_offset<T>( &self, target: &mut [u8], _ctx: &mut T, offset: &mut usize, bits: usize, )

Source§

fn bits_with_user_define(&self, bits: Option<usize>) -> usize

Source§

impl EncodeLe for u8

Source§

fn encode_offset<T>( &self, target: &mut [u8], _ctx: &mut T, offset: &mut usize, bits: usize, )

Source§

fn bits_with_user_define(&self, bits: Option<usize>) -> usize

Source§

impl EncodeLe for u16

Source§

fn encode_offset<T>( &self, target: &mut [u8], _ctx: &mut T, offset: &mut usize, bits: usize, )

Source§

fn bits_with_user_define(&self, bits: Option<usize>) -> usize

Source§

impl EncodeLe for u32

Source§

fn encode_offset<T>( &self, target: &mut [u8], _ctx: &mut T, offset: &mut usize, bits: usize, )

Source§

fn bits_with_user_define(&self, bits: Option<usize>) -> usize

Source§

impl EncodeLe for u64

Source§

fn encode_offset<T>( &self, target: &mut [u8], _ctx: &mut T, offset: &mut usize, bits: usize, )

Source§

fn bits_with_user_define(&self, bits: Option<usize>) -> usize

Source§

impl EncodeLe for u128

Source§

fn encode_offset<T>( &self, target: &mut [u8], _ctx: &mut T, offset: &mut usize, bits: usize, )

Source§

fn bits_with_user_define(&self, bits: Option<usize>) -> usize

Source§

impl<E: EncodeLe> EncodeLe for Option<E>

Source§

fn encode_offset<T>( &self, target: &mut [u8], ctx: &mut T, offset: &mut usize, bits: usize, )

Source§

fn bits_with_user_define(&self, bits: Option<usize>) -> usize

Source§

impl<E: EncodeLe> EncodeLe for Vec<E>

Source§

fn encode_offset<T>( &self, target: &mut [u8], ctx: &mut T, offset: &mut usize, bits: usize, )

Source§

fn bits_with_user_define(&self, bits: Option<usize>) -> usize

Implementors§