tiger_lib::trigger

Function match_trigger_fields

Source
fn match_trigger_fields(
    fields: &[(&str, Trigger)],
    block: &Block,
    data: &Everything,
    sc: &mut ScopeContext,
    tooltipped: Tooltipped,
    negated: bool,
    max_sev: Severity,
) -> bool
Expand description

Implementation of the Trigger::Block variant and its friends. It takes a list of known fields and their own Trigger validators, and checks that the given block contains only fields from that list and validates them.

The field names may have a prefix to indicate how they are to be used.

  • ? means the field is optional
  • * means the field is optional and may occur multiple times
  • + means the field is required and may occur multiple times

The default is that the field is required and may occur only once.

Returns true iff the trigger had side effects (such as saving scopes).