typesize 0.1.6

A library to fetch an accurate estimate of the total memory usage of a value.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
#![cfg(feature = "std")]

use std::collections::HashSet;

use crate::{vec::generic_vec_extra_size, TypeSize};

impl<T: TypeSize, S> TypeSize for HashSet<T, S> {
    fn extra_size(&self) -> usize {
        // TODO: Not this!!
        generic_vec_extra_size::<T>(self.iter(), self.capacity(), self.len())
    }
}