pub trait RawTableAllocExt {
    type T;

    // Required method
    fn insert_accounted(
        &mut self,
        x: Self::T,
        hasher: impl Fn(&Self::T) -> u64,
        accounting: &mut usize
    ) -> Bucket<Self::T>;
}
Expand description

Extension trait for RawTable to account for allocations.

Required Associated Types§

source

type T

Item type.

Required Methods§

source

fn insert_accounted( &mut self, x: Self::T, hasher: impl Fn(&Self::T) -> u64, accounting: &mut usize ) -> Bucket<Self::T>

Insert new element into table and store additional allocated bytes in accounting (additive).

Implementations on Foreign Types§

source§

impl<T> RawTableAllocExt for RawTable<T>

§

type T = T

source§

fn insert_accounted( &mut self, x: Self::T, hasher: impl Fn(&Self::T) -> u64, accounting: &mut usize ) -> Bucket<Self::T>

Implementors§