pub fn encode(
input: EnvelopeInput<'_>,
envelope_limits: Limits,
shared_limits: Limits,
limits: Limits,
scratch: &mut Scratch<'_>,
staging: &mut [u8],
out: &mut [u8],
) -> Result<usize, Error>Expand description
Explicit candidate writer using caller-owned staging and final output. All bytes/metadata are preserved exactly. On every error final output is unchanged; staging may change and must never be published on error. No hidden allocation.