.Hash trait
Closed this issue · 2 comments
1Dragoon commented
I'm kind of a noob to Rust, but I commonly use structures similar to this to build "dynamic" types of sorts for when schemas aren't known until runtime (and insertion order must be retained), and then do operations on these objects with HashSets (union, difference, intersect, etc.) That said, I think it would be useful in situations like mine if IndexMap implemented the .Hash trait, similar to how btreemap does.
cuviper commented
cuviper commented
I'll also note that changing equality comparison is on the list of possible changes for 2.0 (#135), and if we do that it will be feasible to implement Hash
as well. Until then, I think we just can't do it, so I'm closing this.
Feel free to reply if you have any more questions about it.