mbimap

Crates.iombimap
lib.rsmbimap
version0.0.4
created_at2025-07-14 15:48:21.062579+00
updated_at2025-07-15 15:23:55.830567+00
descriptionPooled bijective maps in Rust
homepagehttps://github.com/fawdlstty/mbimap
repositoryhttps://github.com/fawdlstty/mbimap
max_upload_size
id1751929
size7,069
Fawdlstty (fawdlstty)

documentation

README

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]
Commit count: 0

cargo fmt