Skip to main content

CodeLen

Trait CodeLen 

Source
pub trait CodeLen {
    // Required method
    fn len(&self, n: u64) -> usize;
}
Expand description

A trait providing a generic method to compute the length of a codeword.

Required Methods§

Source

fn len(&self, n: u64) -> usize

Returns the length of the codeword for n.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl CodeLen for Codes

Source§

impl CodeLen for FuncCodeLen

Here we do not depend on the bitstream, so there is no need for a “static” version of the trait.

Source§

impl CodeLen for MinimalBinary

Source§

impl<const CODE: usize> CodeLen for ConstCode<CODE>