File tree 2 files changed +8
-0
lines changed
2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,10 @@ use crate::shared_arena_hashmap::SharedArenaHashMap;
10
10
/// The quirky API has the benefit of avoiding
11
11
/// the computation of the hash of the key twice,
12
12
/// or copying the key as long as there is no insert.
13
+ ///
14
+ /// ArenaHashMap is like SharedArenaHashMap but takes ownership
15
+ /// of the memory arena. The memory arena stores the serialized
16
+ /// keys and values.
13
17
pub struct ArenaHashMap {
14
18
shared_arena_hashmap : SharedArenaHashMap ,
15
19
pub memory_arena : MemoryArena ,
Original file line number Diff line number Diff line change @@ -56,6 +56,10 @@ impl KeyValue {
56
56
/// The quirky API has the benefit of avoiding
57
57
/// the computation of the hash of the key twice,
58
58
/// or copying the key as long as there is no insert.
59
+ ///
60
+ /// SharedArenaHashMap is like ArenaHashMap but does not take ownership
61
+ /// of the memory arena.
62
+ /// So one MemoryArena can be shared with multiple SharedArenaHashMap.
59
63
pub struct SharedArenaHashMap {
60
64
table : Vec < KeyValue > ,
61
65
mask : usize ,
You can’t perform that action at this time.
0 commit comments