pub fn data_size<T>(value: &T) -> usizewhere
T: DataSize + ?Sized,
Expand description
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
.