diff --git a/serde/src/de/value.rs b/serde/src/de/value.rs index b0d13b4d6..545417415 100644 --- a/serde/src/de/value.rs +++ b/serde/src/de/value.rs @@ -1045,6 +1045,12 @@ where //////////////////////////////////////////////////////////////////////////////// /// A deserializer holding a `SeqAccess`. +/// +/// This deserializer will call [`Visitor::visit_seq`] for all requests except +/// for [`Deserializer::deserialize_enum`]. In the latest case the enum will be +/// deserialized from the first two elements of a sequence. The first element +/// would be interpreted as a variant name and the second as a content of +/// a variant. In case of unit variant the second element is optional. #[derive(Clone, Debug)] pub struct SeqAccessDeserializer { seq: A, @@ -1479,6 +1485,12 @@ where //////////////////////////////////////////////////////////////////////////////// /// A deserializer holding a `MapAccess`. +/// +/// This deserializer will call [`Visitor::visit_map`] for all requests except +/// for [`Deserializer::deserialize_enum`]. In the latest case the enum will be +/// deserialized from the first entry of a map. The map key would be interpreted +/// as a variant name and the map value would be interpreted as a content of +/// a variant. #[derive(Clone, Debug)] pub struct MapAccessDeserializer { map: A,