Skip to main content

impl_rule_config_methods

Macro impl_rule_config_methods 

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

Implements default_config_section and from_config for a rule backed by a serde RuleConfig struct. Use inside the rule’s impl Rule block; the rule must provide a from_config_struct(config) constructor.

The default arm drops nullable (None) fields from the config section; the nullable arm keeps them visible as schema sentinels so config validation recognizes Option-typed keys.