pub fn serialized_size<T>(value: &T) -> Result<usize>where
T: Serialize,
Expand description
It can sometimes be useful to know the size of a value in its serialized form (e.g. to reserve space for it in
a ring buffer). This calculates the number of bytes taken to serialize some value
of T
into Ptah’s wire
format. Note that this size is for the specific value
, and may differ between values of T
.