Skip to main content

serialize_state

Function serialize_state 

Source
pub fn serialize_state<S, State: ?Sized, V>(
    val: &V,
    _state: &State,
    serializer: S,
) -> Result<S::Ok, S::Error>
where S: Serializer, V: ToString,
Expand description

Stateful variant for types that derive SerializeState: the state is irrelevant for a scalar, so we delegate to the stateless serialize.