Trait StaticCodeRead

Source
pub trait StaticCodeRead<E: Endianness, CR: CodesRead<E> + ?Sized> {
    // Required method
    fn read(&self, reader: &mut CR) -> Result<u64, CR::Error>;
}
Expand description

A trait providing a method to read a code from a CodesRead specified as trait type parameter.

The difference with DynamicCodeRead is that this trait is more specialized, as the CodesRead is a parameter of the trait.

For a fixed code this trait may be implemented by storing a function pointer.

Required Methods§

Source

fn read(&self, reader: &mut CR) -> Result<u64, CR::Error>

Implementors§

Source§

impl<E: Endianness, CR: CodesRead<E> + ?Sized> StaticCodeRead<E, CR> for Codes

Source§

impl<E: Endianness, CR: CodesRead<E> + ?Sized> StaticCodeRead<E, CR> for FuncCodeReader<E, CR>

Source§

impl<E: Endianness, CR: CodesRead<E> + ?Sized, const CODE: usize> StaticCodeRead<E, CR> for ConstCode<CODE>

Source§

impl<W: StaticCodeRead<E, CR>, const ZETA: usize, const GOLOMB: usize, const EXP_GOLOMB: usize, const RICE: usize, const PI: usize, E: Endianness, CR: CodesRead<E> + ?Sized> StaticCodeRead<E, CR> for CodesStatsWrapper<W, ZETA, GOLOMB, EXP_GOLOMB, RICE, PI>