pub struct MapSerializer { /* private fields */ }
Implementations§
Source§impl MapSerializer
impl MapSerializer
pub fn new(len: Option<usize>) -> MapSerializer
Trait Implementations§
Source§impl SerializeMap for MapSerializer
impl SerializeMap for MapSerializer
Source§type Error = SerializerError
type Error = SerializerError
Must match the
Error
type of our Serializer
.Source§fn serialize_key<T>(
&mut self,
key: &T,
) -> Result<(), <MapSerializer as SerializeMap>::Error>
fn serialize_key<T>( &mut self, key: &T, ) -> Result<(), <MapSerializer as SerializeMap>::Error>
Serialize a map key. Read more
Source§fn serialize_value<T>(
&mut self,
value: &T,
) -> Result<(), <MapSerializer as SerializeMap>::Error>
fn serialize_value<T>( &mut self, value: &T, ) -> Result<(), <MapSerializer as SerializeMap>::Error>
Serialize a map value. Read more
Source§fn end(
self,
) -> Result<<MapSerializer as SerializeMap>::Ok, <MapSerializer as SerializeMap>::Error>
fn end( self, ) -> Result<<MapSerializer as SerializeMap>::Ok, <MapSerializer as SerializeMap>::Error>
Finish serializing a map.
Auto Trait Implementations§
impl Freeze for MapSerializer
impl RefUnwindSafe for MapSerializer
impl Send for MapSerializer
impl Sync for MapSerializer
impl Unpin for MapSerializer
impl UnwindSafe for MapSerializer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more