oa_gateway_uci::validate::rules

Function validate

Source
pub fn validate(message: &Message, schema: &Schema) -> Vec<Violation>
Expand description

Check message against schema, reporting everything that does not hold.

An empty result means the message agrees with every constraint this crate reads from the schema. It does not mean the message is correct against a construct the compiler refused or a primitive left unchecked; see the module documentation. Stops at MAX_VIOLATIONS.