Skip to main content

EncoderVariantForS

Trait EncoderVariantForS 

Source
pub trait EncoderVariantForS: RansParams {
    type EncSymbol: EncSymbol;
    type RawEnc: RawEncoder<Symbol = Self::EncSymbol>;

    const MAX_SCALE_BITS: u32;

    // Required methods
    fn units_to_bytes(units: Vec<<Self::RawEnc as RawEncoder>::Unit>) -> Vec<u8> ;
    fn make_encoder() -> Self::RawEnc;
}
Expand description

Maps RansParams implementations to their encoder symbol types.

This trait is automatically implemented for both RansByte and Rans64 and should not need to be implemented manually.

Required Associated Constants§

Source

const MAX_SCALE_BITS: u32

Maximum scale bits for this variant.

Required Associated Types§

Source

type EncSymbol: EncSymbol

The encoder symbol type for this variant.

Source

type RawEnc: RawEncoder<Symbol = Self::EncSymbol>

The raw rANS encoder type for this variant.

Required Methods§

Source

fn units_to_bytes(units: Vec<<Self::RawEnc as RawEncoder>::Unit>) -> Vec<u8>

Convert raw encoder units to a byte vector.

Source

fn make_encoder() -> Self::RawEnc

Create a new encoder instance.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§