bimap-rs
bimap-rs copied to clipboard
Generic bijective maps in Rust
I've created a version which is able to store a value (in addition to the two keys): https://github.com/alexkazik/bimap-rs/tree/set-and-map This approach renames BiHashMap to BiHashSet (since it contains no value) and...
I noticed that `DoubleEndedIterator` could be implemented for the internal `IntoIter` structure. This would add on methods such as `rev()` `next_back()` I'll likely make a fork with the appropriate modifications,...
A more consistent API naming scheme for bimaps would be: - `fn method_left()` and `fn method_right()` for methods that operate on each half of the bimap. - `fn method()` for...
Using generic associated types it's possible to create a fully generic bimap where the left and right map types can be specified independently. Inner maps would be constrained by a...
The internal references in a BiMap are limited to exactly two pointers per value, one for each map. I think it's possible to convert to compile-time reference counting which should...
It'd be really nice to be able to have something akin to the Entry API as it exists on HashMap - something like `left_entry` and `right_entry`, for example
https://github.com/billyrieger/bimap-rs/blob/3dca651620845a939ee9e5393c0a8fe9fe0a1656/src/lib.rs#L222C1-L223C15 I'd like to be able to use `BiBtreeMap` in combination w/ serde but without having std enabled. Should be possible to separate the btreemap and bihashmap serde impls, no?...
Hi, I had to add trait bounds to a struct containing a `BiHashMap` to be able to derive the `Default` trait. This is usually not necessary, and I found it...
close #42 #42 Implementation.