Skip to main content

marshal_exact

Function marshal_exact 

Source
pub fn marshal_exact(node: &Node) -> Result<Vec<u8>>
Expand description

Serialize a Node using a two-pass strategy:

  1. compute exact encoded size
  2. write directly into a fixed-size output buffer

This avoids output buffer growth/copies and can be beneficial for large/variable payloads.