hamt-sync 0.2.5

HAMT implementation whose sub-trees can be shared over threads
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use std::hash::Hash;

pub trait Node
where
    Self: Sized,
{
    type Key: Hash + PartialEq;
    type Value;

    fn insert(&self, Self::Key, Self::Value) -> (Self, bool);
    fn delete(&self, &Self::Key) -> Option<Self>;
    fn find(&self, &Self::Key) -> Option<&Self::Value>;
    fn first_rest(&self) -> Option<(&Self::Key, &Self::Value, Self)>;
    fn is_singleton(&self) -> bool; // for normalization
    fn size(&self) -> usize; // for debugging
}