mz_ore::serde

Function string_key_to_btree_map

Source
pub fn string_key_to_btree_map<'de, K, V, D>(
    deserializer: D,
) -> Result<BTreeMap<K, V>, D::Error>
where K: FromStr + Ord + Debug, K::Err: Display, V: Deserialize<'de>, D: Deserializer<'de>,
Expand description

Used to deserialize fields of std::collections::BTreeMap whose key type is not a native string. Annotate the field with #[serde(deserialize_with = "mz_ore::serde::string_key_to_btree_map")].