ion-rust
ion-rust copied to clipboard
`ion-hash` feature should be compatible with `std::hash::Hash`
Sometimes you want to put Elements in a set. The available sets in the Rust std lib are HashSet (requires Hash and Eq) and BTreeSet (requires Ord). Since we do not have a total ordering over all Ion values, the BTreeSet is out of the picture. We do have a hashing specification for Ion that is already implemented in ion-rust as the ion-hash feature, and so if we could make it compatible with the Hash trait, then we could put Elements in a HashSet or use them as the key for a HashMap.