struct ByteCount<C> {
writer: ByteCounterWriter<C>,
}Fields§
§writer: ByteCounterWriter<C>Trait Implementations§
Source§impl<C: Counter> ByteWrite for ByteCount<C>
impl<C: Counter> ByteWrite for ByteCount<C>
Source§fn write<V: Primitive>(&mut self, _value: V) -> Result<()>
fn write<V: Primitive>(&mut self, _value: V) -> Result<()>
Writes whole numeric value to stream Read more
Source§fn write_as<F: Endianness, V: Primitive>(&mut self, _value: V) -> Result<()>
fn write_as<F: Endianness, V: Primitive>(&mut self, _value: V) -> Result<()>
Writes whole numeric value to stream in a potentially different endianness Read more
Source§fn write_bytes(&mut self, buf: &[u8]) -> Result<()>
fn write_bytes(&mut self, buf: &[u8]) -> Result<()>
Writes the entirety of a byte buffer to the stream. Read more
Source§fn pad(&mut self, bytes: u32) -> Result<()>
fn pad(&mut self, bytes: u32) -> Result<()>
Pads the stream by writing 0 over the given number of bytes. Read more
Source§fn writer_ref(&mut self) -> &mut dyn Write
fn writer_ref(&mut self) -> &mut dyn Write
Returns mutable reference to underlying writer
Source§fn build<T: ToByteStream>(&mut self, build: &T) -> Result<(), T::Error>
fn build<T: ToByteStream>(&mut self, build: &T) -> Result<(), T::Error>
Builds and writes complex type
Source§fn build_with<'a, T: ToByteStreamWith<'a>>(
&mut self,
build: &T,
context: &T::Context,
) -> Result<(), T::Error>
fn build_with<'a, T: ToByteStreamWith<'a>>( &mut self, build: &T, context: &T::Context, ) -> Result<(), T::Error>
Builds and writes complex type with context
Source§fn build_using<T: ToByteStreamUsing>(
&mut self,
build: &T,
context: T::Context,
) -> Result<(), T::Error>
fn build_using<T: ToByteStreamUsing>( &mut self, build: &T, context: T::Context, ) -> Result<(), T::Error>
Builds and writes complex type with owned context
Auto Trait Implementations§
impl<C> Freeze for ByteCount<C>where
C: Freeze,
impl<C> RefUnwindSafe for ByteCount<C>where
C: RefUnwindSafe,
impl<C> Send for ByteCount<C>where
C: Send,
impl<C> Sync for ByteCount<C>where
C: Sync,
impl<C> Unpin for ByteCount<C>where
C: Unpin,
impl<C> UnsafeUnpin for ByteCount<C>where
C: UnsafeUnpin,
impl<C> UnwindSafe for ByteCount<C>where
C: 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