Skip to main content

value_entry

Function value_entry 

Source
pub fn value_entry<M: SerializeMap, P: Primitive>(
    map: &mut M,
    key: &str,
    primitive: &P,
) -> Result<(), M::Error>
Expand description

Writes key with the primitive’s value, unless it carries none.

§Errors

Returns the serializer’s error.