StringHashMapUnmanaged
Key memory is managed by the caller. Keys and values will not automatically be freed.
Fields of this type
Fields
Type definitions in this namespace
Types
Functions in this namespace
Functions
- lockPointers
- Puts the hash map into a state where any method call that would
- unlockPointers
- Undoes a call to `lockPointers`.
- putNoClobber
- Insert an entry in the map.
- putAssumeCapacity
- Asserts there is enough capacity to store the new key-value pair.
- putAssumeCapacityNoClobber
- Insert an entry in the map.
- fetchPut
- Inserts a new `Entry` into the hash map, returning the previous one, if any.
- fetchPutAssumeCapacity
- Inserts a new `Entry` into the hash map, returning the previous one, if any.
- fetchRemove
- If there is an `Entry` with a matching key, it is deleted from
- put
- Insert an entry if the associated key is not already present, otherwise update preexisting value.
- getKeyPtr
- Get an optional pointer to the actual key associated with adapted key, if present.
- getKey
- Get a copy of the actual key associated with adapted key, if present.
- getPtr
- Get an optional pointer to the value associated with key, if present.
- get
- Get a copy of the value associated with key, if present.
- contains
- Return true if there is a value associated with key in the map.
- remove
- If there is an `Entry` with a matching key, it is deleted from
- removeContext
- TODO: answer the question in these doc comments, does this
- removeAdapted
- TODO: answer the question in these doc comments, does this
- removeByPtr
- Delete the entry with key pointed to by key_ptr from the hash map.
- move
- Set the map to an empty state, making deinitialization a no-op, and
- rehash
- Rehash the map, in-place.
A map containing no keys or values.
Values
- empty
- A map containing no keys or values.
Source
Implementation
pub fn StringHashMapUnmanaged(comptime V: type) type {
return HashMapUnmanaged([]const u8, V, StringContext, default_max_load_percentage);
}