Skip to main content

serialized_len

Function serialized_len 

Source
pub fn serialized_len<T: Serialize>(value: &T) -> Result<usize>
Expand description

Measures the length of a value’s JSON serialization.

The value is written to a sink that counts bytes rather than retaining them, so the length costs no buffer. Serialization failures are returned.