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>
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,
n_bits: usize,
) -> Result<usize, Self::Error>
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 moreSource§fn write_unary(&mut self, value: u64) -> Result<usize, Self::Error>
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.Source§fn flush(&mut self) -> Result<usize, Self::Error>
fn flush(&mut self) -> Result<usize, Self::Error>
Flush the buffer, consuming the bit stream. Read more
fn copy_from<F: Endianness, R: BitRead<F>>( &mut self, bit_read: &mut R, n: u64, ) -> Result<(), CopyError<R::Error, Self::Error>>
Source§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: Endianness, W> CopyType for DbgBitWriter<E, W>
impl<E: Endianness, W> CopyType for DbgBitWriter<E, W>
Source§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: 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, ) -> 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, ) -> Result<(), Error>
Source§impl<E: Endianness, W> MemSize for DbgBitWriter<E, W>
impl<E: Endianness, W> MemSize 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> 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, U> CastableInto<U> for Twhere
U: CastableFrom<T>,
impl<T, U> CastableInto<U> for Twhere
U: CastableFrom<T>,
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<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> ExpGolombWrite<E> for B
impl<E, B> ExpGolombWrite<E> for B
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 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>
Writes to a
core::fmt::Write
debug infos 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 infos 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 infos about the structure memory
usage as mem_dbg_on
, but expanding only up to
max_depth
levels of nested structures.Source§impl<E, B> MinimalBinaryWrite<E> for Bwhere
E: Endianness,
B: BitWrite<E>,
impl<E, B> MinimalBinaryWrite<E> for Bwhere
E: Endianness,
B: BitWrite<E>,
Source§impl<E, B> OmegaWrite<E> for Bwhere
E: Endianness,
B: BitWrite<E>,
impl<E, B> OmegaWrite<E> for Bwhere
E: Endianness,
B: BitWrite<E>,
Source§impl<E, B> RiceWrite<E> for Bwhere
E: Endianness,
B: BitWrite<E>,
impl<E, B> RiceWrite<E> for Bwhere
E: Endianness,
B: BitWrite<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.