Skip to main content

new_item_objects

Function new_item_objects 

Source
pub(crate) fn new_item_objects<'v>(
    value: &'v Value,
    noun: &str,
    shape: &str,
    fields: &[&str],
) -> Result<Vec<&'v Map<String, Value>>, EditError>
Expand description

The objects an add value creates, each checked to have only fields. noun names an item in errors, e.g. “an audience”, and shape is the error for an item that isn’t an object.