Skip to main content

encode_into

Function encode_into 

Source
pub fn encode_into(
    output: &mut Vec<u8>,
    schema_version: u32,
    payload: &[u8],
    limits: SaveLimits,
) -> Result<(), SaveError>
Expand description

Encodes using reusable output storage. Admission/allocation failures preserve its existing bytes. CRC covers the fixed prefix (including game schema and payload length) followed by the payload; integers are little-endian.