Skip to main content

struct_item

Function struct_item 

Source
pub fn struct_item(name: &str, fields: &[(&str, Value)]) -> Value
Expand description

Build a minimal StructConfig-shaped JSON value.

fields is a slice of (field_name, field_type_json) pairs. The field_type_json is an already-built FieldType JSON value — use string_type, bool_type, etc. for primitives.