pub fn encoded_len<T: Serialize + ?Sized>(
value: &T,
encoding: Encoding,
limits: Limits,
) -> Result<usize, Error>Expand description
Measure the complete selected encoding without allocating codec output.
Custom Serialize code is trusted and must be deterministic across calls. This does not return a reusable admission token.
ยงErrors
Returns Limit for exhausted allowances, otherwise Malformed for serializer failure. Framed lengths include the 11-byte header.