Skip to main content

encode_named_into

Function encode_named_into 

Source
pub fn encode_named_into<T: Serialize + ?Sized>(
    value: &T,
    buffer: &mut Vec<u8>,
) -> Result<(), DecodeError>
Expand description

The in-place form of encode_named: clear and fill the caller’s buffer, so a hot loop reuses one allocation across encodes. Bytes identical to encode_named by construction (it delegates here), so there is still exactly one encoder.