Skip to main content

PiReadParam

Trait PiReadParam 

Source
pub trait PiReadParam<E: Endianness>: BitRead<E> + RiceRead<E> {
    // Required methods
    fn read_pi_param(&mut self, k: usize) -> Result<u64, Self::Error>;
    fn read_pi2_param<const USE_TABLE: bool>(
        &mut self,
    ) -> Result<u64, Self::Error>;
}
Expand description

Parametric trait for reading π codes.

This trait is more general than PiRead, as it makes it possible to specify how to use tables using const parameters.

We provide an implementation of this trait for BitRead. An implementation of PiRead using default values is usually provided exploiting the crate::codes::params::ReadParams mechanism.

Required Methods§

Source

fn read_pi_param(&mut self, k: usize) -> Result<u64, Self::Error>

Source

fn read_pi2_param<const USE_TABLE: bool>(&mut self) -> Result<u64, Self::Error>

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.

Implementors§