Does exist crate with a hashmap as a trait without bound to a concrete implementation of a trait?
What kind of functionality do you need from this trait? Would the
Index + IndexMut suffice, for example?
What about all? Or as much as possible. Rust's bug does not let me use struct. But my code could probably work with a trait instead of a struct.
I will try
Index + IndexMut. Thanks.
Very unlikely, since:
- a trait which is implemented only by one type is almost always redundant;
- a trait which will be implemented for at least both
BTreeMapwill inevitably miss some functionality (e.g. everything which uses the ordering guarantees of the latter).
Could you share an example of problematic code? There might be another workaround.
Sure. Here is the problem. No luck to find a solution so far.
By the way, it seems
HashMap does not implement