Struct BitRecorder
struct BitRecorder<N, E: Endianness> { ... }
For recording writes in order to play them back on another writer
Example
use Write;
use ;
let mut recorder: = new;
recorder.write.unwrap;
recorder.write.unwrap;
recorder.write.unwrap;
assert_eq!;
let mut writer = endian;
recorder.playback;
assert_eq!;
Implementations
impl<N: Default + Copy, E: Endianness> BitRecorder<N, E>
fn new() -> SelfCreates new recorder
fn with_capacity(writes: usize) -> SelfCreates new recorder sized for the given number of writes
fn endian(_endian: E) -> SelfCreates new recorder with the given endianness
fn written(self: &Self) -> NReturns number of bits written
fn playback<W: BitWrite>(self: &Self, writer: &mut W) -> Result<()>Plays recorded writes to the given writer
impl<N, E> BitWrite for BitRecorder<N, E>
fn write_bit(self: &mut Self, bit: bool) -> Result<()>fn write<U>(self: &mut Self, bits: u32, value: U) -> Result<()> where U: Numericfn write_out<BITS: u32, U>(self: &mut Self, value: U) -> Result<()> where U: Numericfn write_signed<S>(self: &mut Self, bits: u32, value: S) -> Result<()> where S: SignedNumericfn write_signed_out<BITS: u32, S>(self: &mut Self, value: S) -> Result<()> where S: SignedNumericfn write_from<V>(self: &mut Self, value: V) -> Result<()> where V: Primitivefn write_as_from<F, V>(self: &mut Self, value: V) -> Result<()> where F: Endianness, V: Primitivefn write_unary0(self: &mut Self, value: u32) -> Result<()>fn write_unary1(self: &mut Self, value: u32) -> Result<()>fn write_bytes(self: &mut Self, buf: &[u8]) -> Result<()>fn byte_aligned(self: &Self) -> bool
impl<N, E> Freeze for BitRecorder<N, E>
impl<N, E> HuffmanWrite for BitRecorder<N, E>
fn write_huffman<T>(self: &mut Self, tree: &WriteHuffmanTree<E, T>, symbol: T) -> Result<()> where T: Ord + Copy
impl<N, E> RefUnwindSafe for BitRecorder<N, E>
impl<N, E> Send for BitRecorder<N, E>
impl<N, E> Sync for BitRecorder<N, E>
impl<N, E> Unpin for BitRecorder<N, E>
impl<N, E> UnsafeUnpin for BitRecorder<N, E>
impl<N, E> UnwindSafe for BitRecorder<N, E>
impl<N: $crate::default::Default, E: $crate::default::Default + Endianness> Default for BitRecorder<N, E>
fn default() -> BitRecorder<N, E>
impl<T> Any for BitRecorder<N, E>
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for BitRecorder<N, E>
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for BitRecorder<N, E>
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> From for BitRecorder<N, E>
fn from(t: T) -> TReturns the argument unchanged.
impl<T, U> Into for BitRecorder<N, E>
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for BitRecorder<N, E>
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for BitRecorder<N, E>
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>