immutable-avl 1.0.0

An Immutable map and set implement for rust based on an AVL tree
Documentation
  • Coverage
  • 0%
    0 out of 9 items documented0 out of 7 items with examples
  • Size
  • Source code size: 14.25 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.43 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • Homepage
  • yunwei37/immutable-map-rs
    6 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • yunwei37

An Immutable Map implement for rust

This is an immutable (functional) set or map implementation based on an immutable AVL tree, purely safe rust.

The time and space complexity of add or remove operations is log(N) in the size of the original set.

This little project was inspired by using the ImmutableMap in LLVM/Clang static analyzer.

Usage

let set = ImmutableSet::new();
let new_set = set.insert(1);

let map = ImmutableMap::new();
let new_map = new_map.insert(1, "abc");
let new_map = new_map.delete(1, "abc");
let size = new_map.size();
let data = new_map.get_val_as_ref(1);

Reference