Skip to main content

Module marshal

Module marshal 

Source

Functionsยง

marshal
marshal_auto
Serialize a Node using a conservative auto strategy.
marshal_exact
Serialize a Node using a two-pass strategy:
marshal_ref
Zero-copy serialization of a NodeRef to a new Vec<u8>. Prefer marshal_ref_to with a reusable buffer for best performance.
marshal_ref_auto
Serialize a NodeRef using the same conservative auto strategy as marshal_auto.
marshal_ref_exact
Serialize a NodeRef using a two-pass exact-size strategy.
marshal_ref_to
Zero-copy serialization of a NodeRef directly into a writer. This avoids the allocation overhead of converting to an owned Node first.
marshal_ref_to_vec
Serialize a borrowed node directly into a Vec<u8> using the fast vec writer path.
marshal_shallow
Serialize a Node in one pass, into a buffer reserved from a shallow size estimate.
marshal_to
marshal_to_vec
Serialize an owned node directly into a Vec<u8> using the fast vec writer path.
unmarshal_packed_ref
Decode a packed payload: the format byte plus node bytes, exactly what marshal produces and what a frame carries before unpack.
unmarshal_ref
Decode node bytes: the buffer without the format byte, which is what the receive path holds after unpack and what OwnedNodeRef stores. For a buffer that still carries the format byte, as marshal writes it, use unmarshal_packed_ref.