pub fn encode_snapshot_bounded<S: Copy, E: Copy>(
snapshot: S,
output: &mut [u8],
max_len: usize,
error: E,
encode: for<'encoder> fn(S, &mut SnapshotEncoder<'encoder, E>) -> Result<(), E>,
) -> Result<usize, E>Expand description
Encodes one immutable snapshot under an aggregate byte cap.
Capacity and aggregate-limit failures occur before the output is modified.
The encode_snapshot snapshot contract also applies.