mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-06-10 20:31:01 +00:00
Document misuse of SerializeMap
This commit is contained in:
@@ -1639,6 +1639,11 @@ pub trait SerializeMap {
|
||||
T: Serialize;
|
||||
|
||||
/// Serialize a map value.
|
||||
///
|
||||
/// # Panics
|
||||
///
|
||||
/// Calling `serialize_value` before `serialize_key` is incorrect and is
|
||||
/// allowed to panic or produce bogus results.
|
||||
fn serialize_value<T: ?Sized>(&mut self, value: &T) -> Result<(), Self::Error>
|
||||
where
|
||||
T: Serialize;
|
||||
|
||||
Reference in New Issue
Block a user