Skip to main content

set_class

Function set_class 

Source
pub fn set_class<S: Into<String>>(state: &mut State, class: S)
Expand description

Sets the class of the value that is serialized.

This is what Object uses internally. It must be called from Serialize::serialize and applies to the value serialized from that call (see State::event). Maps are written as objects of the class, strings as enum cases (E:) and bytes as custom serialized objects (C:). Serializers of other formats ignore it.