EncodeBe

Trait EncodeBe 

Source
pub trait EncodeBe {
    // 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 EncodeBe 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 EncodeBe 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 EncodeBe 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 EncodeBe 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 EncodeBe 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 EncodeBe 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 EncodeBe 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 EncodeBe 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 EncodeBe 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 EncodeBe 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 EncodeBe 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 EncodeBe 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 EncodeBe 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: EncodeBe> EncodeBe 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: EncodeBe> EncodeBe 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§