[−][src]Trait darklua_core::rules::Rule
Defines an interface that will be used to mutate blocks and how to serialize and deserialize the rule configuration.
Required methods
fn process(&self, block: &mut Block)
This method should mutate the given block to apply the rule.
fn configure(
&mut self,
properties: RuleProperties
) -> Result<(), RuleConfigurationError>
&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.
fn get_name(&self) -> &'static str
This method should the unique name of the rule.
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.
Implementors
impl Rule for RemoveEmptyDo
[src]
fn process(&self, block: &mut Block)
[src]
fn configure(
&mut self,
properties: RuleProperties
) -> Result<(), RuleConfigurationError>
[src]
&mut self,
properties: RuleProperties
) -> Result<(), RuleConfigurationError>