mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-04-23 01:18:02 +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:
@@ -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