3 releases

Uses old Rust 2015

0.1.2 Jan 23, 2017
0.1.1 Aug 11, 2016
0.1.0 Aug 10, 2016

#2146 in Data structures

Download history 2/week @ 2023-12-25 13/week @ 2024-02-19 33/week @ 2024-02-26 8/week @ 2024-03-04 16/week @ 2024-03-11 7/week @ 2024-03-18

65 downloads per month
Used in automatic-relations

MIT/Apache

94KB
2K SLoC

Immutable Map

immutable-map-rs on Travis CI

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.

No runtime deps