pub struct EstimatedHashSet<T: EstimateSize> {
inner: HashSet<T>,
heap_size: KvSize,
}
Fields§
§inner: HashSet<T>
§heap_size: KvSize
Implementations§
source§impl<T> EstimatedHashSet<T>
impl<T> EstimatedHashSet<T>
sourcepub fn from_vec(v: EstimatedVec<T>) -> Self
pub fn from_vec(v: EstimatedVec<T>) -> Self
Convert an EstimatedVec
to a EstimatedHashSet
. Do not need to recalculate the
heap size.
source§impl<T: EstimateSize> EstimatedHashSet<T>
impl<T: EstimateSize> EstimatedHashSet<T>
Trait Implementations§
source§impl<T: Default + EstimateSize> Default for EstimatedHashSet<T>
impl<T: Default + EstimateSize> Default for EstimatedHashSet<T>
source§fn default() -> EstimatedHashSet<T>
fn default() -> EstimatedHashSet<T>
Returns the “default value” for a type. Read more
source§impl<T: EstimateSize> EstimateSize for EstimatedHashSet<T>
impl<T: EstimateSize> EstimateSize for EstimatedHashSet<T>
source§fn estimated_heap_size(&self) -> usize
fn estimated_heap_size(&self) -> usize
The estimated heap size of the current struct in bytes.
source§fn estimated_size(&self) -> usizewhere
Self: Sized,
fn estimated_size(&self) -> usizewhere
Self: Sized,
The estimated total size of the current struct in bytes, including the
estimated_heap_size
and the size of Self
.Auto Trait Implementations§
impl<T> !Freeze for EstimatedHashSet<T>
impl<T> RefUnwindSafe for EstimatedHashSet<T>where
T: RefUnwindSafe,
impl<T> Send for EstimatedHashSet<T>where
T: Send,
impl<T> Sync for EstimatedHashSet<T>where
T: Sync,
impl<T> Unpin for EstimatedHashSet<T>where
T: Unpin,
impl<T> UnwindSafe for EstimatedHashSet<T>where
T: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more