pub fn data_size<T>(value: &T) -> usizewhere T: DataSize + ?Sized,
Estimates allocated heap data from data of value.
Checks if T is dynamic; if it is not, returns T::STATIC_HEAP_SIZE. Otherwise delegates to T::estimate_heap_size.
T
T::STATIC_HEAP_SIZE
T::estimate_heap_size