Skip to main content

serialized_len

Function serialized_len 

Source
fn serialized_len(body: &Value) -> usize
Expand description

Byte length of body once serialized, without allocating a copy of it.

The budget is denominated in wire bytes, and a Value has none until it is serialized — but a 200 KB conversation does not need to be materialized twice just to be measured.