pub trait RuleConfiguration {
// Required methods
fn configure(
&mut self,
properties: RuleProperties,
) -> Result<(), RuleConfigurationError>;
fn get_name(&self) -> &'static str;
fn serialize_to_properties(&self) -> RuleProperties;
// Provided method
fn has_properties(&self) -> bool { ... }
}
Required Methods§
Sourcefn configure(
&mut self,
properties: RuleProperties,
) -> Result<(), RuleConfigurationError>
fn configure( &mut self, properties: RuleProperties, ) -> Result<(), RuleConfigurationError>
The rule deserializer will construct the default rule and then send the properties through this method to modify the behavior of the rule.
Sourcefn serialize_to_properties(&self) -> RuleProperties
fn serialize_to_properties(&self) -> RuleProperties
For implementing the serialize trait on the Rule trait, this method should return all properties that differs from their default value.
Provided Methods§
Sourcefn has_properties(&self) -> bool
fn has_properties(&self) -> bool
Returns true
if the rule has at least one property.