pub struct DbgBitWriter<E: Endianness, W> { /* private fields */ }Expand description
A wrapper over a BitWrite that reports on standard error all operations performed,
including all code writes.
Implementations§
Source§impl<E: Endianness, W> DbgBitWriter<E, W>
impl<E: Endianness, W> DbgBitWriter<E, W>
Trait Implementations§
Source§impl<E: Endianness, W: BitWrite<E>> BitWrite<E> for DbgBitWriter<E, W>
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,
num_bits: usize,
) -> Result<usize, Self::Error>
fn write_bits( &mut self, value: u64, num_bits: usize, ) -> Result<usize, Self::Error>
Writes the lowest
num_bits bits of value to the stream and
returns the number of bits written, that is, num_bits. Read moreSource§fn write_unary(&mut self, n: u64) -> Result<usize, Self::Error>
fn write_unary(&mut self, n: u64) -> Result<usize, Self::Error>
Writes
n as a unary code to the stream and returns the number of
bits written, that is, n plus one. Read moreSource§impl<E: Clone + Endianness, W: Clone> Clone for DbgBitWriter<E, W>
impl<E: Clone + Endianness, W: Clone> Clone for DbgBitWriter<E, W>
Source§fn clone(&self) -> DbgBitWriter<E, W>
fn clone(&self) -> DbgBitWriter<E, W>
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, W: Debug> Debug for DbgBitWriter<E, W>
impl<E: Debug + Endianness, W: Debug> Debug for DbgBitWriter<E, W>
Source§impl<E: Endianness, W: DeltaWrite<E>> DeltaWrite<E> for DbgBitWriter<E, W>
impl<E: Endianness, W: DeltaWrite<E>> DeltaWrite<E> for DbgBitWriter<E, W>
Source§impl<E: Endianness, W> FlatType for DbgBitWriter<E, W>
impl<E: Endianness, W> FlatType for DbgBitWriter<E, W>
Source§impl<E: Endianness, W: GammaWrite<E>> GammaWrite<E> for DbgBitWriter<E, W>
impl<E: Endianness, W: GammaWrite<E>> GammaWrite<E> for DbgBitWriter<E, W>
Source§impl<E: Endianness, W> MemDbgImpl for DbgBitWriter<E, W>
impl<E: Endianness, W> MemDbgImpl for DbgBitWriter<E, W>
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, W> MemSize for DbgBitWriter<E, W>
impl<E: Endianness, W> MemSize for DbgBitWriter<E, W>
Source§impl<E: Endianness, W: OmegaWrite<E>> OmegaWrite<E> for DbgBitWriter<E, W>
impl<E: Endianness, W: OmegaWrite<E>> OmegaWrite<E> for DbgBitWriter<E, W>
Source§impl<E: Endianness, W: PiWrite<E>> PiWrite<E> for DbgBitWriter<E, W>
impl<E: Endianness, W: PiWrite<E>> PiWrite<E> for DbgBitWriter<E, W>
Auto Trait Implementations§
impl<E, W> Freeze for DbgBitWriter<E, W>where
W: Freeze,
impl<E, W> RefUnwindSafe for DbgBitWriter<E, W>where
W: RefUnwindSafe,
E: RefUnwindSafe,
impl<E, W> Send for DbgBitWriter<E, W>where
W: Send,
impl<E, W> Sync for DbgBitWriter<E, W>where
W: Sync,
impl<E, W> Unpin for DbgBitWriter<E, W>
impl<E, W> UnsafeUnpin for DbgBitWriter<E, W>where
W: UnsafeUnpin,
impl<E, W> UnwindSafe for DbgBitWriter<E, W>where
W: 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> DeltaWriteParam<BigEndian> for Bwhere
B: GammaWriteParam<BigEndian>,
impl<B> DeltaWriteParam<BigEndian> for Bwhere
B: GammaWriteParam<BigEndian>,
Source§impl<B> DeltaWriteParam<LittleEndian> for Bwhere
B: GammaWriteParam<LittleEndian>,
impl<B> DeltaWriteParam<LittleEndian> for Bwhere
B: GammaWriteParam<LittleEndian>,
Source§impl<E, B> ExpGolombWrite<E> for Bwhere
E: Endianness,
B: GammaWrite<E>,
impl<E, B> ExpGolombWrite<E> for Bwhere
E: Endianness,
B: GammaWrite<E>,
Source§impl<B> GammaWriteParam<BigEndian> for B
impl<B> GammaWriteParam<BigEndian> for B
Source§impl<B> GammaWriteParam<LittleEndian> for Bwhere
B: BitWrite<LittleEndian>,
impl<B> GammaWriteParam<LittleEndian> for Bwhere
B: BitWrite<LittleEndian>,
fn write_gamma_param<const USE_TABLE: bool>( &mut self, n: u64, ) -> Result<usize, <B as BitWrite<LittleEndian>>::Error>
Source§impl<E, B> GolombWrite<E> for Bwhere
E: Endianness,
B: BitWrite<E>,
impl<E, B> GolombWrite<E> for Bwhere
E: Endianness,
B: BitWrite<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.