[][src]Function maidsafe_utilities::serialisation::serialised_size_with_limit

pub fn serialised_size_with_limit<T: Serialize>(
    data: &T,
    max: u64
) -> Option<u64>

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

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