pub struct WxfWriter<W> { /* private fields */ }Expand description
Typed WXF writer wrapping a raw byte Writer.
Implementations§
Source§impl<W: Writer> WxfWriter<W>
impl<W: Writer> WxfWriter<W>
Sourcepub fn new(inner: W) -> Self
pub fn new(inner: W) -> Self
Wrap a raw writer. The writer emits only the WXF token stream — the
8: / 8C: header is framing, written by crate::to_wxf.
Sourcepub fn into_inner(self) -> W
pub fn into_inner(self) -> W
Consume the writer, returning the underlying sink.
Sourcepub fn write_varint(&mut self, n: u64) -> Result<(), Error>
pub fn write_varint(&mut self, n: u64) -> Result<(), Error>
Write a WXF varint (LEB128, 7-bit groups, little-endian).
Sourcepub fn write_expr_token(&mut self, t: ExpressionEnum) -> Result<(), Error>
pub fn write_expr_token(&mut self, t: ExpressionEnum) -> Result<(), Error>
Write a single expression token byte.
Sourcepub fn write_integer(&mut self, n: i64) -> Result<(), Error>
pub fn write_integer(&mut self, n: i64) -> Result<(), Error>
Write an integer using the smallest of Integer8/16/32/64.
Sourcepub fn write_symbol(&mut self, name: &str) -> Result<(), Error>
pub fn write_symbol(&mut self, name: &str) -> Result<(), Error>
Write a Symbol (fully-qualified name).
Sourcepub fn write_big_integer(&mut self, digits: &str) -> Result<(), Error>
pub fn write_big_integer(&mut self, digits: &str) -> Result<(), Error>
Write a BigInteger from its decimal digit string.
Sourcepub fn write_big_real(&mut self, digits: &str) -> Result<(), Error>
pub fn write_big_real(&mut self, digits: &str) -> Result<(), Error>
Write a BigReal from its digit string.
Sourcepub fn write_numeric_array(
&mut self,
dt: NumericArrayEnum,
dims: &[usize],
bytes: &[u8],
) -> Result<(), Error>
pub fn write_numeric_array( &mut self, dt: NumericArrayEnum, dims: &[usize], bytes: &[u8], ) -> Result<(), Error>
Write a NumericArray from raw parts.
Sourcepub fn write_packed_array(
&mut self,
dt: PackedArrayEnum,
dims: &[usize],
bytes: &[u8],
) -> Result<(), Error>
pub fn write_packed_array( &mut self, dt: PackedArrayEnum, dims: &[usize], bytes: &[u8], ) -> Result<(), Error>
Write a PackedArray from raw parts.
Sourcepub fn write_function(&mut self, arity: usize) -> Result<(), Error>
pub fn write_function(&mut self, arity: usize) -> Result<(), Error>
Write a Function header (head[args…]): the token + arity. The caller
next writes the head value, then arity argument values.
Auto Trait Implementations§
impl<W> Freeze for WxfWriter<W>where
W: Freeze,
impl<W> RefUnwindSafe for WxfWriter<W>where
W: RefUnwindSafe,
impl<W> Send for WxfWriter<W>where
W: Send,
impl<W> Sync for WxfWriter<W>where
W: Sync,
impl<W> Unpin for WxfWriter<W>where
W: Unpin,
impl<W> UnsafeUnpin for WxfWriter<W>where
W: UnsafeUnpin,
impl<W> UnwindSafe for WxfWriter<W>where
W: 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