Skip to main content

reject_unknown_keys

Function reject_unknown_keys 

Source
pub(crate) fn reject_unknown_keys(
    object: &Map<String, Value>,
    allowed: &[&str],
    noun: &str,
) -> Result<(), EditError>
Expand description

Fails with UnknownField naming every key of object outside allowed. noun names the object in the message, e.g. “a block”.