pub struct DbgBitReader<E: Endianness, R> { /* private fields */ }
Expand description

A wrapper over a BitRead that report on standard error all operations performed, including all code reads.

Implementations§

source§

impl<E: Endianness, R> DbgBitReader<E, R>

source

pub fn new(cr: R) -> Self

Trait Implementations§

source§

impl<E: Endianness, R: BitRead<E>> BitRead<E> for DbgBitReader<E, R>
where R::PeekWord: Display,

§

type Error = <R as BitRead<E>>::Error

§

type PeekWord = <R as BitRead<E>>::PeekWord

The type we can read from the stream without advancing.
source§

fn peek_bits(&mut self, n_bits: usize) -> Result<Self::PeekWord, Self::Error>

Peeks at n bits without advancing the stream position. n must be nonzero, and at most PeekWord::BITS.
source§

fn skip_bits(&mut self, n_bits: usize) -> Result<(), Self::Error>

Skip n bits from the stream.
source§

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

Read n bits and return them in the lowest bits. Read more
source§

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

Read a unary code. Read more
source§

fn read_unary(&mut self) -> Result<u64, Self::Error>

Read a unary code. Read more
source§

fn skip_unary(&mut self) -> Result<(), Self::Error>

Skip a unary code.
source§

impl<E: Endianness, R: DeltaRead<E>> DeltaRead<E> for DbgBitReader<E, R>
where R::PeekWord: Display,

source§

fn read_delta(&mut self) -> Result<u64, R::Error>

source§

fn skip_delta(&mut self) -> Result<(), R::Error>

source§

impl<E: Endianness, R: GammaRead<E>> GammaRead<E> for DbgBitReader<E, R>
where R::PeekWord: Display,

source§

fn read_gamma(&mut self) -> Result<u64, R::Error>

source§

fn skip_gamma(&mut self) -> Result<(), R::Error>

source§

impl<E: Endianness, R: ZetaRead<E>> ZetaRead<E> for DbgBitReader<E, R>
where R::PeekWord: Display,

source§

fn read_zeta3(&mut self) -> Result<u64, R::Error>

source§

fn skip_zeta3(&mut self) -> Result<(), R::Error>

source§

fn read_zeta(&mut self, k: u64) -> Result<u64, R::Error>

source§

fn skip_zeta(&mut self, k: u64) -> Result<(), R::Error>

Auto Trait Implementations§

§

impl<E, R> RefUnwindSafe for DbgBitReader<E, R>

§

impl<E, R> Send for DbgBitReader<E, R>
where E: Send, R: Send,

§

impl<E, R> Sync for DbgBitReader<E, R>
where E: Sync, R: Sync,

§

impl<E, R> Unpin for DbgBitReader<E, R>
where E: Unpin, R: Unpin,

§

impl<E, R> UnwindSafe for DbgBitReader<E, R>
where E: UnwindSafe, R: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CastableFrom<T> for T

source§

fn cast_from(value: T) -> T

Call Self as W
source§

impl<T, U> CastableInto<U> for T
where U: CastableFrom<T>,

source§

fn cast(self) -> U

Call W::cast_from(self)
source§

impl<B> DeltaReadParam<BigEndian> for B

source§

fn read_delta_param<const USE_DELTA_TABLE: bool, const USE_GAMMA_TABLE: bool>( &mut self ) -> Result<u64, <B as BitRead<BigEndian>>::Error>

source§

fn skip_delta_param<const USE_DELTA_TABLE: bool, const USE_GAMMA_TABLE: bool>( &mut self ) -> Result<(), <B as BitRead<BigEndian>>::Error>

source§

impl<B> DeltaReadParam<LittleEndian> for B

source§

fn read_delta_param<const USE_DELTA_TABLE: bool, const USE_GAMMA_TABLE: bool>( &mut self ) -> Result<u64, <B as BitRead<LittleEndian>>::Error>

source§

fn skip_delta_param<const USE_DELTA_TABLE: bool, const USE_GAMMA_TABLE: bool>( &mut self ) -> Result<(), <B as BitRead<LittleEndian>>::Error>

source§

impl<T> DowncastableFrom<T> for T

source§

fn downcast_from(value: T) -> T

Truncate the current UnsignedInt to a possibly smaller size
source§

impl<T, U> DowncastableInto<U> for T
where U: DowncastableFrom<T>,

source§

fn downcast(self) -> U

Call W::downcast_from(self)
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<B> GammaReadParam<BigEndian> for B
where B: BitRead<BigEndian>,

source§

fn read_gamma_param<const USE_TABLE: bool>( &mut self ) -> Result<u64, <B as BitRead<BigEndian>>::Error>

source§

fn skip_gamma_param<const USE_TABLE: bool>( &mut self ) -> Result<(), <B as BitRead<BigEndian>>::Error>

source§

impl<B> GammaReadParam<LittleEndian> for B

source§

fn read_gamma_param<const USE_TABLE: bool>( &mut self ) -> Result<u64, <B as BitRead<LittleEndian>>::Error>

source§

fn skip_gamma_param<const USE_TABLE: bool>( &mut self ) -> Result<(), <B as BitRead<LittleEndian>>::Error>

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<BO, B> MinimalBinaryRead<BO> for B
where BO: Endianness, B: BitRead<BO>,

source§

fn read_minimal_binary(&mut self, max: u64) -> Result<u64, Self::Error>

source§

fn skip_minimal_binary(&mut self, max: u64) -> Result<(), Self::Error>

source§

impl<T> Splat<T> for T

source§

fn splat(value: T) -> T

source§

impl<T> To<T> for T

source§

fn to(self) -> T

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> UpcastableFrom<T> for T

source§

fn upcast_from(value: T) -> T

Extend the current UnsignedInt to a possibly bigger size.
source§

impl<T, U> UpcastableInto<U> for T
where U: UpcastableFrom<T>,

source§

fn upcast(self) -> U

Call W::upcast_from(self)
source§

impl<B> ZetaReadParam<BigEndian> for B
where B: BitRead<BigEndian>,

source§

fn read_zeta_param( &mut self, k: u64 ) -> Result<u64, <B as BitRead<BigEndian>>::Error>

source§

fn skip_zeta_param( &mut self, k: u64 ) -> Result<(), <B as BitRead<BigEndian>>::Error>

source§

fn read_zeta3_param<const USE_TABLE: bool>( &mut self ) -> Result<u64, <B as BitRead<BigEndian>>::Error>

source§

fn skip_zeta3_param<const USE_TABLE: bool>( &mut self ) -> Result<(), <B as BitRead<BigEndian>>::Error>

source§

impl<B> ZetaReadParam<LittleEndian> for B

source§

fn read_zeta_param( &mut self, k: u64 ) -> Result<u64, <B as BitRead<LittleEndian>>::Error>

source§

fn skip_zeta_param( &mut self, k: u64 ) -> Result<(), <B as BitRead<LittleEndian>>::Error>

source§

fn read_zeta3_param<const USE_TABLE: bool>( &mut self ) -> Result<u64, <B as BitRead<LittleEndian>>::Error>

source§

fn skip_zeta3_param<const USE_TABLE: bool>( &mut self ) -> Result<(), <B as BitRead<LittleEndian>>::Error>