pub type HashMap<'arena, K, V, A, S = DefaultHashBuilder> = HashMap<K, V, S, &'arena A>;Expand description
A hash map whose entries live in an arena.
The allocator slot is fixed to &'arena A, so construct it with
hashbrown::HashMap::new_in (or with_capacity_in) and pass &arena:
ⓘ
let mut map: HashMap<u32, u32, SharedArena> = HashMap::new_in(&arena);Aliased Type§
pub struct HashMap<'arena, K, V, A, S = DefaultHashBuilder> { /* private fields */ }Trait Implementations§
Source§impl<'arena, K, V, A, S> FromIteratorIn<(K, V)> for HashMap<'arena, K, V, A, S>
impl<'arena, K, V, A, S> FromIteratorIn<(K, V)> for HashMap<'arena, K, V, A, S>
Source§fn from_iter_in<I>(iter: I, alloc: Self::Alloc) -> Selfwhere
I: IntoIterator<Item = (K, V)>,
fn from_iter_in<I>(iter: I, alloc: Self::Alloc) -> Selfwhere
I: IntoIterator<Item = (K, V)>,
Builds
Self from iter, allocating into alloc.