Skip to main content

StructPrefix

Type Alias StructPrefix 

Source
pub type StructPrefix = fn(&Schema<'_>, &mut dyn ShapeSerializer) -> Result<(), SerdeError>;
Expand description

Callback for writing members into the currently open structure map.

Runs after the map and its container state are opened, before modeled members. The schema is the value’s structure or union schema, obtained through [SerializableStruct::schema]. Any error is returned immediately without writing modeled members.