Skip to main content

validate_params

Function validate_params 

Source
pub fn validate_params(
    declared: &BTreeMap<String, ParamSpec>,
    given: &Value,
) -> Result<Map<String, Value>, String>
Expand description

Validate spawn-time params against the declared schema: unknown keys, missing required keys and type/enum mismatches are refused naming the field; declared defaults fill in. Returns the effective map.