Skip to main content

impl_rule_config_schema

Macro impl_rule_config_schema 

Source
macro_rules! impl_rule_config_schema {
    ($config_ty:ty) => { ... };
}
Expand description

Implements config_schema for a rule backed by a serde RuleConfig struct, so the set of keys config validation accepts is derived from the same struct from_config deserializes and cannot drift from it. Use inside the rule’s impl Rule block.

Rules that also want the derived user-facing defaults use [impl_rule_config_sections]; this macro alone is for a rule that presents its defaults differently (ordering, commentary) but still deserializes through serde.