Struct dsi_bitstream::utils::DbgBitReader
source · 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>
impl<E: Endianness, R> DbgBitReader<E, R>
Trait Implementations§
source§impl<E: Endianness, R: BitRead<E>> BitRead<E> for DbgBitReader<E, R>
impl<E: Endianness, R: BitRead<E>> BitRead<E> for DbgBitReader<E, R>
type Error = <R as BitRead<E>>::Error
source§fn peek_bits(&mut self, n_bits: usize) -> Result<Self::PeekWord, Self::Error>
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>
fn skip_bits(&mut self, n_bits: usize) -> Result<(), Self::Error>
Skip
n
bits from the stream. Read moresource§fn read_bits(&mut self, n_bits: usize) -> Result<u64, Self::Error>
fn read_bits(&mut self, n_bits: usize) -> Result<u64, Self::Error>
Read
n
bits and return them in the lowest bits. Read morefn copy_to<F: Endianness, W: BitWrite<F>>( &mut self, bit_write: &mut W, n: u64 ) -> Result<(), CopyError<Self::Error, W::Error>>
source§impl<E: Clone + Endianness, R: Clone> Clone for DbgBitReader<E, R>
impl<E: Clone + Endianness, R: Clone> Clone for DbgBitReader<E, R>
source§fn clone(&self) -> DbgBitReader<E, R>
fn clone(&self) -> DbgBitReader<E, R>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<E: Endianness, R> CopyType for DbgBitReader<E, R>
impl<E: Endianness, R> CopyType for DbgBitReader<E, R>
source§impl<E: Debug + Endianness, R: Debug> Debug for DbgBitReader<E, R>
impl<E: Debug + Endianness, R: Debug> Debug for DbgBitReader<E, R>
source§impl<E: Endianness, R: DeltaRead<E>> DeltaRead<E> for DbgBitReader<E, R>
impl<E: Endianness, R: DeltaRead<E>> DeltaRead<E> for DbgBitReader<E, R>
source§impl<E: Endianness, R: GammaRead<E>> GammaRead<E> for DbgBitReader<E, R>
impl<E: Endianness, R: GammaRead<E>> GammaRead<E> for DbgBitReader<E, R>
source§impl<E: Endianness, R> MemDbgImpl for DbgBitReader<E, R>
impl<E: Endianness, R> MemDbgImpl for DbgBitReader<E, R>
source§impl<E: Endianness, R> MemSize for DbgBitReader<E, R>
impl<E: Endianness, R> MemSize for DbgBitReader<E, R>
Auto Trait Implementations§
impl<E, R> Freeze for DbgBitReader<E, R>where
E: Endianness + 'static,
R: Freeze,
impl<E, R> RefUnwindSafe for DbgBitReader<E, R>where
E: Endianness + 'static + RefUnwindSafe,
R: RefUnwindSafe,
impl<E, R> Send for DbgBitReader<E, R>
impl<E, R> Sync for DbgBitReader<E, R>
impl<E, R> Unpin for DbgBitReader<E, R>
impl<E, R> UnwindSafe for DbgBitReader<E, R>where
E: Endianness + 'static + UnwindSafe,
R: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T, U> CastableInto<U> for Twhere
U: CastableFrom<T>,
impl<T, U> CastableInto<U> for Twhere
U: CastableFrom<T>,
source§impl<B> DeltaReadParam<BigEndian> for Bwhere
B: GammaReadParam<BigEndian>,
impl<B> DeltaReadParam<BigEndian> for Bwhere
B: GammaReadParam<BigEndian>,
source§impl<B> DeltaReadParam<LittleEndian> for Bwhere
B: GammaReadParam<LittleEndian>,
impl<B> DeltaReadParam<LittleEndian> for Bwhere
B: GammaReadParam<LittleEndian>,
fn read_delta_param<const USE_DELTA_TABLE: bool, const USE_GAMMA_TABLE: bool>( &mut self ) -> Result<u64, <B as BitRead<LittleEndian>>::Error>
source§impl<T> DowncastableFrom<T> for T
impl<T> DowncastableFrom<T> for T
source§fn downcast_from(value: T) -> T
fn downcast_from(value: T) -> T
Truncate the current UnsignedInt to a possibly smaller size
source§impl<T, U> DowncastableInto<U> for Twhere
U: DowncastableFrom<T>,
impl<T, U> DowncastableInto<U> for Twhere
U: DowncastableFrom<T>,
source§impl<E, B> ExpGolombRead<E> for B
impl<E, B> ExpGolombRead<E> for B
source§impl<B> GammaReadParam<BigEndian> for B
impl<B> GammaReadParam<BigEndian> for B
source§impl<B> GammaReadParam<LittleEndian> for Bwhere
B: BitRead<LittleEndian>,
impl<B> GammaReadParam<LittleEndian> for Bwhere
B: BitRead<LittleEndian>,
fn read_gamma_param<const USE_TABLE: bool>( &mut self ) -> Result<u64, <B as BitRead<LittleEndian>>::Error>
source§impl<E, B> GolombRead<E> for Bwhere
E: Endianness,
B: BitRead<E>,
impl<E, B> GolombRead<E> for Bwhere
E: Endianness,
B: BitRead<E>,
source§impl<T> MemDbg for Twhere
T: MemDbgImpl,
impl<T> MemDbg for Twhere
T: MemDbgImpl,
source§fn mem_dbg(&self, flags: DbgFlags) -> Result<(), Error>
fn mem_dbg(&self, flags: DbgFlags) -> Result<(), Error>
Write to stdout debug infos about the structure memory usage, expanding
all levels of nested structures.
source§fn mem_dbg_on(
&self,
writer: &mut impl Write,
flags: DbgFlags
) -> Result<(), Error>
fn mem_dbg_on( &self, writer: &mut impl Write, flags: DbgFlags ) -> Result<(), Error>
Write to a
core::fmt::Write
debug infos about the structure memory usage,
expanding all levels of nested structures.source§fn mem_dbg_depth(
&self,
total_size: usize,
max_depth: usize,
flags: DbgFlags
) -> Result<(), Error>
fn mem_dbg_depth( &self, total_size: usize, max_depth: usize, flags: DbgFlags ) -> Result<(), Error>
Write to stdout debug infos about the structure memory usage, but expanding only
up to
max_depth
levels of nested structures.source§fn mem_dbg_depth_on(
&self,
writer: &mut impl Write,
total_size: usize,
max_depth: usize,
prefix: &mut String,
field_name: Option<&str>,
is_last: bool,
flags: DbgFlags
) -> Result<(), Error>
fn mem_dbg_depth_on( &self, writer: &mut impl Write, total_size: usize, max_depth: usize, prefix: &mut String, field_name: Option<&str>, is_last: bool, flags: DbgFlags ) -> Result<(), Error>
Write to a
core::fmt::Write
debug infos about the structure memory usage,
but expanding only up to max_depth
levels of nested structures.source§impl<E, B> MinimalBinaryRead<E> for Bwhere
E: Endianness,
B: BitRead<E>,
impl<E, B> MinimalBinaryRead<E> for Bwhere
E: Endianness,
B: BitRead<E>,
source§impl<E, B> RiceRead<E> for Bwhere
E: Endianness,
B: BitRead<E>,
impl<E, B> RiceRead<E> for Bwhere
E: Endianness,
B: BitRead<E>,
source§impl<T> UpcastableFrom<T> for T
impl<T> UpcastableFrom<T> for T
source§fn upcast_from(value: T) -> T
fn upcast_from(value: T) -> T
Extend the current UnsignedInt to a possibly bigger size.