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

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

Implementations§

source§

impl<E: Endianness, W> DbgBitWriter<E, W>

source

pub fn new(cw: W) -> Self

Trait Implementations§

source§

impl<E: Endianness, W: BitWrite<E>> BitWrite<E> for DbgBitWriter<E, W>

§

type Error = <W as BitWrite<E>>::Error

source§

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

Write the lowest n bits of value to the stream and return the number of bits written, that is, n. Read more
source§

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

Write value as a unary code to the stream and return the number of bits written, that is, value plus one. Read more
source§

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

Write value as a unary code to the stream and return the number of bits written, that is, value plus one. Read more
source§

fn flush(self) -> Result<(), Self::Error>

Flush the buffer, consuming the bit stream.
source§

impl<E: Endianness, W: DeltaWrite<E>> DeltaWrite<E> for DbgBitWriter<E, W>

source§

fn write_delta(&mut self, value: u64) -> Result<usize, W::Error>

source§

impl<E: Endianness, W: GammaWrite<E>> GammaWrite<E> for DbgBitWriter<E, W>

source§

fn write_gamma(&mut self, value: u64) -> Result<usize, W::Error>

source§

impl<E: Endianness, W: ZetaWrite<E>> ZetaWrite<E> for DbgBitWriter<E, W>

source§

fn write_zeta(&mut self, value: u64, k: u64) -> Result<usize, W::Error>

source§

fn write_zeta3(&mut self, value: u64) -> Result<usize, W::Error>

Auto Trait Implementations§

§

impl<E, W> RefUnwindSafe for DbgBitWriter<E, W>

§

impl<E, W> Send for DbgBitWriter<E, W>
where E: Send, W: Send,

§

impl<E, W> Sync for DbgBitWriter<E, W>
where E: Sync, W: Sync,

§

impl<E, W> Unpin for DbgBitWriter<E, W>
where E: Unpin, W: Unpin,

§

impl<E, W> UnwindSafe for DbgBitWriter<E, W>
where E: UnwindSafe, W: 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> DeltaWriteParam<BigEndian> for B

source§

fn write_delta_param<const USE_DELTA_TABLE: bool, const USE_GAMMA_TABLE: bool>( &mut self, n: u64 ) -> Result<usize, <B as BitWrite<BigEndian>>::Error>

source§

impl<B> DeltaWriteParam<LittleEndian> for B

source§

fn write_delta_param<const USE_DELTA_TABLE: bool, const USE_GAMMA_TABLE: bool>( &mut self, n: u64 ) -> Result<usize, <B as BitWrite<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> GammaWriteParam<BigEndian> for B
where B: BitWrite<BigEndian>,

source§

fn write_gamma_param<const USE_TABLE: bool>( &mut self, n: u64 ) -> Result<usize, <B as BitWrite<BigEndian>>::Error>

source§

impl<B> GammaWriteParam<LittleEndian> for B

source§

fn write_gamma_param<const USE_TABLE: bool>( &mut self, n: u64 ) -> Result<usize, <B as BitWrite<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> MinimalBinaryWrite<BO> for B
where BO: Endianness, B: BitWrite<BO>,

source§

fn write_minimal_binary( &mut self, n: u64, max: u64 ) -> Result<usize, 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> ZetaWriteParam<BigEndian> for B
where B: BitWrite<BigEndian>,

source§

fn write_zeta_param<const USE_TABLE: bool>( &mut self, n: u64, k: u64 ) -> Result<usize, <B as BitWrite<BigEndian>>::Error>

source§

fn write_zeta3_param<const USE_TABLE: bool>( &mut self, n: u64 ) -> Result<usize, <B as BitWrite<BigEndian>>::Error>

source§

impl<B> ZetaWriteParam<LittleEndian> for B

source§

fn write_zeta_param<const USE_TABLE: bool>( &mut self, n: u64, k: u64 ) -> Result<usize, <B as BitWrite<LittleEndian>>::Error>

source§

fn write_zeta3_param<const USE_TABLE: bool>( &mut self, n: u64 ) -> Result<usize, <B as BitWrite<LittleEndian>>::Error>