Function serde_tagged::de::adj::map::deserialize_known
source · pub fn deserialize_known<'de, 'a, T, V, K, Kc: ?Sized, D>(
deserializer: D,
tag_key: &'a Kc,
value_key: &'a Kc,
) -> Result<(T, V), D::Error>where
T: Deserialize<'de>,
V: Deserialize<'de>,
D: Deserializer<'de>,
K: Deserialize<'de> + PartialEq<&'a Kc>,
Expand description
Deserialize a map-based adjacently tagged value of known type.
The deserializer controls the underlying data format while the seed-factory specifies the instructions (depending on the tag) on how the value should be deserialized.
See de
for more information on
SeedFactory
and implementations thereof.
See deserialize_known_seed
for a version that
allows you to pass DeserializeSeed
implementations to deserialize the tag
and value. This version is equivalent to
deserialize_known_seed(deserializer, seed_factory, PhantomData<T>, PhantomData<V>)
§Note
If you do not need to choose a specific deserialization-method based on the
tag, you should prefer this method to deserialize
.