pub struct DbgBitReader<E: Endianness, R> { /* private fields */ }Expand description
A wrapper over a BitRead that reports 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>
Source§const PEEK_BITS: usize = R::PEEK_BITS
const PEEK_BITS: usize = R::PEEK_BITS
The number of bits that
peek_bits is guaranteed
to return successfully (with zero-extended EOF).type Error = <R as BitRead<E>>::Error
Source§type PeekWord = <R as BitRead<E>>::PeekWord
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>
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 Self::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§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 duplicate 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: 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> FlatType for DbgBitReader<E, R>
impl<E: Endianness, R> FlatType 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>
fn _mem_dbg_rec_on( &self, _memdbg_writer: &mut impl Write, _memdbg_total_size: usize, _memdbg_max_depth: usize, _memdbg_prefix: &mut String, _memdbg_is_last: bool, _memdbg_flags: DbgFlags, _memdbg_refs: &mut HashSet<usize>, ) -> Result
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, padded_size: usize, flags: DbgFlags, dbg_refs: &mut HashSet<usize>, ) -> Result<(), Error>
Source§fn _mem_dbg_depth_on_impl(
&self,
writer: &mut impl Write,
total_size: usize,
max_depth: usize,
prefix: &mut String,
field_name: Option<&str>,
is_last: bool,
padded_size: usize,
flags: DbgFlags,
dbg_refs: &mut HashSet<usize>,
ref_display: RefDisplay,
) -> Result<(), Error>
fn _mem_dbg_depth_on_impl( &self, writer: &mut impl Write, total_size: usize, max_depth: usize, prefix: &mut String, field_name: Option<&str>, is_last: bool, padded_size: usize, flags: DbgFlags, dbg_refs: &mut HashSet<usize>, ref_display: RefDisplay, ) -> Result<(), Error>
Internal implementation for depth display. Read more
Source§impl<E: Endianness, R> MemSize for DbgBitReader<E, R>
impl<E: Endianness, R> MemSize for DbgBitReader<E, R>
Source§impl<E: Endianness, R: OmegaRead<E>> OmegaRead<E> for DbgBitReader<E, R>
impl<E: Endianness, R: OmegaRead<E>> OmegaRead<E> for DbgBitReader<E, R>
Source§impl<E: Endianness, R: PiRead<E>> PiRead<E> for DbgBitReader<E, R>
impl<E: Endianness, R: PiRead<E>> PiRead<E> for DbgBitReader<E, R>
Auto Trait Implementations§
impl<E, R> Freeze for DbgBitReader<E, R>where
R: Freeze,
impl<E, R> RefUnwindSafe for DbgBitReader<E, R>where
R: RefUnwindSafe,
E: RefUnwindSafe,
impl<E, R> Send for DbgBitReader<E, R>where
R: Send,
impl<E, R> Sync for DbgBitReader<E, R>where
R: Sync,
impl<E, R> Unpin for DbgBitReader<E, R>
impl<E, R> UnsafeUnpin for DbgBitReader<E, R>where
R: UnsafeUnpin,
impl<E, R> UnwindSafe for DbgBitReader<E, R>where
R: UnwindSafe,
E: 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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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<E, B> ExpGolombRead<E> for Bwhere
E: Endianness,
B: GammaRead<E>,
impl<E, B> ExpGolombRead<E> for Bwhere
E: Endianness,
B: GammaRead<E>,
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>
Writes to stderr debug info 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>
Writes to a
core::fmt::Write debug info about the structure memory
usage, expanding all levels of nested structures.Source§fn mem_dbg_depth(&self, max_depth: usize, flags: DbgFlags) -> Result<(), Error>
fn mem_dbg_depth(&self, max_depth: usize, flags: DbgFlags) -> Result<(), Error>
Writes to stderr debug info about the structure memory usage as
mem_dbg, but expanding only up to max_depth
levels of nested structures.Source§fn mem_dbg_depth_on(
&self,
writer: &mut impl Write,
max_depth: usize,
flags: DbgFlags,
) -> Result<(), Error>
fn mem_dbg_depth_on( &self, writer: &mut impl Write, max_depth: usize, flags: DbgFlags, ) -> Result<(), Error>
Writes to a
core::fmt::Write debug info about the structure memory
usage as mem_dbg_on, but expanding only up to
max_depth levels of nested structures.