pub struct ChampMapSync<K, V> { /* private fields */ }Expand description
Persistent hash map based on a CHAMP trie, multi-threaded.
Identical API to ChampMap but backed by
SharedArena for Send + Sync support.
Implementations§
Source§impl<K, V> ChampMapSync<K, V>
impl<K, V> ChampMapSync<K, V>
Sourcepub fn checkpoint(&self) -> ChampCheckpoint<K, V>
pub fn checkpoint(&self) -> ChampCheckpoint<K, V>
Saves the current map state for later rollback.
Sourcepub fn arena_len(&self) -> (usize, usize, usize)
pub fn arena_len(&self) -> (usize, usize, usize)
Returns the total number of allocated items in each arena:
(nodes, entries, children).
Includes dead COW copies — reflects true memory footprint.
Sourcepub fn rollback(&mut self, cp: ChampCheckpoint<K, V>)
pub fn rollback(&mut self, cp: ChampCheckpoint<K, V>)
Restores the map to a previously saved checkpoint.
Source§impl<K: Hash + Eq, V> ChampMapSync<K, V>
impl<K: Hash + Eq, V> ChampMapSync<K, V>
Source§impl<K: Hash + Eq + Clone, V: Hash + Clone> ChampMapSync<K, V>
impl<K: Hash + Eq + Clone, V: Hash + Clone> ChampMapSync<K, V>
Trait Implementations§
Source§impl<K, V> Debug for ChampMapSync<K, V>
impl<K, V> Debug for ChampMapSync<K, V>
Source§impl<K, V> Default for ChampMapSync<K, V>
impl<K, V> Default for ChampMapSync<K, V>
Source§impl<K: Hash + Eq + Clone, V: Hash + Clone> Extend<(K, V)> for ChampMapSync<K, V>
impl<K: Hash + Eq + Clone, V: Hash + Clone> Extend<(K, V)> for ChampMapSync<K, V>
Source§fn extend<I: IntoIterator<Item = (K, V)>>(&mut self, iter: I)
fn extend<I: IntoIterator<Item = (K, V)>>(&mut self, iter: I)
Extends a collection with the contents of an iterator. Read more
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one)Extends a collection with exactly one element.
Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one)Reserves capacity in a collection for the given number of additional elements. Read more
Source§impl<K: Hash + Eq + Clone, V: Hash + Clone> FromIterator<(K, V)> for ChampMapSync<K, V>
impl<K: Hash + Eq + Clone, V: Hash + Clone> FromIterator<(K, V)> for ChampMapSync<K, V>
Source§impl<'a, K, V> IntoIterator for &'a ChampMapSync<K, V>
impl<'a, K, V> IntoIterator for &'a ChampMapSync<K, V>
Auto Trait Implementations§
impl<K, V> !Freeze for ChampMapSync<K, V>
impl<K, V> RefUnwindSafe for ChampMapSync<K, V>
impl<K, V> Send for ChampMapSync<K, V>
impl<K, V> Sync for ChampMapSync<K, V>
impl<K, V> Unpin for ChampMapSync<K, V>
impl<K, V> UnsafeUnpin for ChampMapSync<K, V>
impl<K, V> UnwindSafe for ChampMapSync<K, V>where
K: UnwindSafe,
V: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more