logos.mem.collections.hashmap
Module mem · package logos-mem
Types
structHashMap
struct HashMap
Hash map with open addressing and linear probing; load factor 0.75, power-of-two capacity.
Mutating/lookup methods are unsafe and take raw self pointers; construct via
hashmap_new or hashmap_with_capacity.
Implements: Drop
Fields
cap: i64
entries: *mut Entry<K, V>
len: i64
states: *mut u8
structHashMapIter
struct HashMapIter
Iterator over (&K, &V) entries of a HashMap; created by iter().
Holds raw pointers into the table — inserting during iteration may resize and dangle them.
Implements: Iterator
Fields
cap: i64
entries: *const Entry<K, V>
idx: i64
states: *const u8
structHashMapKeys
struct HashMapKeys
Iterator over &K keys of a HashMap; created by keys().
Implements: Iterator
Fields
cap: i64
entries: *const Entry<K, V>
idx: i64
states: *const u8
structHashMapValues
struct HashMapValues
Iterator over &V values of a HashMap; created by values().
Implements: Iterator
Fields
cap: i64
entries: *const Entry<K, V>
idx: i64
states: *const u8
Functions
fnhashmap_new
fn hashmap_new() -> HashMap<K, V>
Creates an empty HashMap with capacity 16.
fnhashmap_with_capacity
fn hashmap_with_capacity(cap_hint: i64) -> HashMap<K, V>
Creates an empty HashMap with cap_hint rounded up to a power of two (minimum 8).