mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-10-24 20:55:01 +00:00
Split serialize_map_elt
Like what's been done on the deserialization side with MapVisitor, this allows some weirder uses of Serde to handle the key and value in separate steps.
This commit is contained in:
1 parent
061a1d8a8c
commit
ea833d3427
4 files changed
+27
-11
No files matched your search
@@ -229,9 +229,14 @@ impl Serializer for BytesSerializer {
|
||||
Err(Error)
|
||||
}
|
||||
|
||||
fn serialize_map_elt<K, V>(&mut self, _: &mut (), _key: K, _value: V) -> Result<(), Error>
|
||||
where K: Serialize,
|
||||
V: Serialize,
|
||||
fn serialize_map_key<T>(&mut self, _: &mut (), _key: T) -> Result<(), Error>
|
||||
where T: Serialize
|
||||
{
|
||||
Err(Error)
|
||||
}
|
||||
|
||||
fn serialize_map_value<T>(&mut self, _: &mut (), _value: T) -> Result<(), Error>
|
||||
where T: Serialize
|
||||
{
|
||||
Err(Error)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user