Function indexmap::map::serde_seq::deserialize
source ยท pub fn deserialize<'de, D, K, V, S>(
deserializer: D,
) -> Result<IndexMap<K, V, S>, D::Error>where
D: Deserializer<'de>,
K: Deserialize<'de> + Eq + Hash,
V: Deserialize<'de>,
S: Default + BuildHasher,
Expand description
Deserializes an IndexMap
from an ordered sequence.
This function may be used in a field attribute for deriving Deserialize
:
#[derive(Deserialize)]
struct Data {
#[serde(deserialize_with = "indexmap::map::serde_seq::deserialize")]
map: IndexMap<i32, u64>,
// ...
}