Document misuse of SerializeMap
This commit is contained in:
parent
b9b7922ef1
commit
a8adac6b93
@ -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;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user