Function biodivine_sketchbook::sketchbook::utils::_stringify_and_order_keys
source ยท pub fn _stringify_and_order_keys<K: ToString + Ord, V>(
map: &HashMap<K, V>,
) -> BTreeMap<String, &V>
Expand description
Convert keys of the HashMap
to String
, and then order the map by converting it into
a sorted BTreeMap
.
The ordering enables deterministic serialization, and the string keys are needed to correctly
implement the serde::Serialize trait (serde_json
requires String
map keys).