3 releases
Uses old Rust 2015
0.1.2 | Jan 23, 2017 |
---|---|
0.1.1 | Aug 11, 2016 |
0.1.0 | Aug 10, 2016 |
#2233 in Data structures
41 downloads per month
Used in automatic-relations
94KB
2K
SLoC
Immutable Map
Immutable map and set for Rust
lib.rs
:
Immutable binary search tree.
This crate provides functional programming style binary search trees which returns modified
copy of original map or set with the new data, and preserves the original. Many features and
algorithms are borrowed from Data.Map
of Haskell's standard library.
See https://yoichihirai.com/bst.pdf for the balancing algorithm.
To share the data between the old and the new data structure after modification, most of the
functions require the key and value type to implement Clone
. If you want to store non-
clonable data into this map, you can wrap it under shared pointer such as Rc
or Arc
.