Function bincode::serde::serialized_size_bounded [] [src]

pub fn serialized_size_bounded<T: Serialize>(value: &T, max: u64) -> Option<u64>

Given a maximum size limit, check how large an object would be if it were to be serialized.

If it can be serialized in max or fewer bytes, that number will be returned inside Some. If it goes over bounds, then None is returned.