Module spacetimedb_table::pointer_map
source · Expand description
Provides PointerMap that deals with the
association of a RowHash to a RowPointer
through operations insert
and delete.
These associations can then be queried through
map.pointers_for(hash) and map.pointers_for_mut(hash).
In most cases, this will result in a 1:1 mapping
and so a direct hit in a hash map.
If however multiple pointers collide to a single hash,
all of these pointers will be returned, in an arbitrary unstable order.
Pointers are returned as a slice, which does not require an allocation.
In this highly unlikely event of a collision,
retrieval is probably no more than 100% slower.
Structs§
- An pointer map
RowHash -> [RowPointer].