Trait DynamicCodeRead

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

A trait providing a method to read a code from a generic CodesRead.

The difference with StaticCodeRead is that this trait is more generic, as the CodesRead is a parameter of the method, and not of the trait.

Required Methods§

Source

fn read<E: Endianness, CR: CodesRead<E> + ?Sized>( &self, reader: &mut CR, ) -> Result<u64, CR::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§

Source§

impl DynamicCodeRead for Codes

Source§

impl<W: DynamicCodeRead, const ZETA: usize, const GOLOMB: usize, const EXP_GOLOMB: usize, const RICE: usize, const PI: usize> DynamicCodeRead for CodesStatsWrapper<W, ZETA, GOLOMB, EXP_GOLOMB, RICE, PI>

Source§

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