Function alkahest::serialized_size

source ·
pub fn serialized_size<F, T>(value: T) -> (usize, usize)where
    F: Formula + ?Sized,
    T: Serialize<F>,
Expand description

Returns the number of bytes required to serialize the value. Note that value is consumed.

Use when value is Copy or can be cheaply replicated to allocate the buffer for serialization in advance. Or to find out required size after serialize fails.