mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-06-14 23:11:01 +00:00
Document misuse of SerializeMap
This commit is contained in:
@@ -1639,6 +1639,11 @@ pub trait SerializeMap {
|
|||||||
T: Serialize;
|
T: Serialize;
|
||||||
|
|
||||||
/// Serialize a map value.
|
/// 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>
|
fn serialize_value<T: ?Sized>(&mut self, value: &T) -> Result<(), Self::Error>
|
||||||
where
|
where
|
||||||
T: Serialize;
|
T: Serialize;
|
||||||
|
|||||||
Reference in New Issue
Block a user