mbimap 0.0.4

Pooled bijective maps in Rust
Documentation
  • Coverage
  • 0%
    0 out of 14 items documented0 out of 13 items with examples
  • Size
  • Source code size: 6.59 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.41 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 15s Average build duration of successful builds.
  • all releases: 13s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • fawdlstty/mbimap
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • fawdlstty

mbimap

Similar to bimap, but it provides a pooled dataset, facilitating the storage of multiple mappings.

Example

let mut map = MbiMap::new();
map.insert(1, "a");
map.insert_by_left(2, vec!["a", "b", "c"]);
map.insert_by_right(vec![3, 4], "b");
println!("{:?}", map.get_by_left(&2)); // [a, b, c]
println!("{:?}", map.get_by_right(&"b")); // [2, 3, 4]
map.remove_all_by_left(&1);
map.remove_all_by_right(&"c");
println!("{map:?}"); // 2->[a, b],  3->[b],  4->[b]