pub struct HashMapSerializer<KS, VS>(/* private fields */);Expand description
Statically serializes HashMap<KS::Target, VS::Target> at roots or recursive carrier nodes. This zero-sized carrier composes its key and value serializers and is not registered independently.
Trait Implementations§
Source§impl<KS, VS> Serializer for HashMapSerializer<KS, VS>
impl<KS, VS> Serializer for HashMapSerializer<KS, VS>
type Target = HashMap<<KS as Serializer>::Target, <VS as Serializer>::Target>
Source§fn write_data(
value: &Self::Target,
context: &mut WriteContext<'_>,
) -> Result<(), Error>
fn write_data( value: &Self::Target, context: &mut WriteContext<'_>, ) -> Result<(), Error>
Write the target body only.
Source§fn read_data(context: &mut ReadContext<'_>) -> Result<Self::Target, Error>
fn read_data(context: &mut ReadContext<'_>) -> Result<Self::Target, Error>
Read the target body only.
Source§fn default_value(context: &mut ReadContext<'_>) -> Result<Self::Target, Error>
fn default_value(context: &mut ReadContext<'_>) -> Result<Self::Target, Error>
Construct a target for a null or missing local value.
Source§fn read_arc_any(
context: &mut ReadContext<'_>,
) -> Result<Arc<dyn Any + Send + Sync>, Error>
fn read_arc_any( context: &mut ReadContext<'_>, ) -> Result<Arc<dyn Any + Send + Sync>, Error>
Read directly into the final owner for sync dynamic carriers.
Auto Trait Implementations§
impl<KS, VS> Freeze for HashMapSerializer<KS, VS>
impl<KS, VS> RefUnwindSafe for HashMapSerializer<KS, VS>
impl<KS, VS> Send for HashMapSerializer<KS, VS>
impl<KS, VS> Sync for HashMapSerializer<KS, VS>
impl<KS, VS> Unpin for HashMapSerializer<KS, VS>
impl<KS, VS> UnsafeUnpin for HashMapSerializer<KS, VS>
impl<KS, VS> UnwindSafe for HashMapSerializer<KS, VS>
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