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§
Sourceconst MAX_SCALE_BITS: u32
const MAX_SCALE_BITS: u32
Maximum scale bits for this variant.
Required Associated Types§
Required Methods§
Sourcefn units_to_bytes(units: Vec<<Self::RawEnc as RawEncoder>::Unit>) -> Vec<u8> ⓘ
fn units_to_bytes(units: Vec<<Self::RawEnc as RawEncoder>::Unit>) -> Vec<u8> ⓘ
Convert raw encoder units to a byte vector.
Sourcefn make_encoder() -> Self::RawEnc
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".