pub struct BytesWriter { /* private fields */ }Available on crate feature
bytes only.Implementations§
Trait Implementations§
Source§impl Clone for BytesWriter
impl Clone for BytesWriter
Source§fn clone(&self) -> BytesWriter
fn clone(&self) -> BytesWriter
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BytesWriter
impl Debug for BytesWriter
Source§impl Default for BytesWriter
impl Default for BytesWriter
Source§fn default() -> BytesWriter
fn default() -> BytesWriter
Returns the “default value” for a type. Read more
Source§impl Sink for BytesWriter
impl Sink for BytesWriter
Source§fn byte_order(&self) -> ByteOrder
fn byte_order(&self) -> ByteOrder
The byte order applied to a byte-multiple value (default big-endian).
Source§fn bit_order(&self) -> BitOrder
fn bit_order(&self) -> BitOrder
The bit order this sink writes in (default MSB-first). Paired with
byte_order exactly as on Source: each bit order has a
natural byte layout (big-endian under MSB, little-endian under LSB), and only the
opposite declaration swaps a byte-multiple value.Source§fn scratch(&mut self) -> Option<&mut dyn Any>
fn scratch(&mut self) -> Option<&mut dyn Any>
A type-erased, encode-scoped scratch value for codecs that need mutable state
shared across a whole message’s fields — a back-reference / compression dictionary
(e.g. DNS name compression). Recover the concrete type with
downcast_mut. Read moreSource§fn write_bytes(&mut self, bytes: &[u8]) -> Result<(), BitError>
fn write_bytes(&mut self, bytes: &[u8]) -> Result<(), BitError>
Appends a run of bytes — the bulk dual of
Source::read_bytes, replacing the
per-byte write(b)? loop in custom codecs. Works at any bit offset. Read moreSource§fn as_write(&mut self) -> SinkWriter<'_, Self> ⓘwhere
Self: Sized,
fn as_write(&mut self) -> SinkWriter<'_, Self> ⓘwhere
Self: Sized,
Available on crate feature
std only.Borrows this sink as a
std::io::Write — the dual of Source::as_read, for
handing the cursor to std::io-based code from a #[bw(write_with = …)]. Writes 8
bits per byte; see SinkWriter. Only with the std feature.Auto Trait Implementations§
impl !RefUnwindSafe for BytesWriter
impl !Send for BytesWriter
impl !Sync for BytesWriter
impl !UnwindSafe for BytesWriter
impl Freeze for BytesWriter
impl Unpin for BytesWriter
impl UnsafeUnpin for BytesWriter
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