pub fn calc_serialized_data_size<T: ?Sized>(value: &T) -> u64
where
    T: ser::Serialize,
{
    let mut checker = SizeChecker {
        counter: Counter {
            total: 0,
            limit: None,
        },
        pos: 0,
    };

    value.serialize(&mut checker).ok();
    checker.counter.total
}
/// Returns the size that an object would be if serialized.
Returns the size that an object would be if serialized.
Returns the size that an object would be if serialized .
pub fn calc_serialized_data_size<T: ?Sized>(value: &T) -> u64
where
    T: ser::Serialize,
{
    let mut checker = SizeChecker {
        counter: Counter {
            total: 0,
            limit: None,
        },
        pos: 0,
    };
    value.serialize(&mut checker).ok();
    checker.counter.total
}
pub fn calc_serialized_data_size < T : ? Sized > ( value : & T ) -> u64 where T : ser :: Serialize , { let mut checker = SizeChecker { counter : Counter { total : 0 , limit : None , } , pos : 0 , } ; value . serialize ( & mut checker ) . ok ( ) ; checker . counter . total }
Returns the size that an object would be if serialized.
Returns the size that an object would be if serialized .
value
&T