Trait darklua_core::rules::Rule
source · [−]pub trait Rule: RuleConfiguration {
fn process(
&self,
block: &mut Block,
context: &mut Context
) -> RuleProcessResult;
}Expand description
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, context: &mut Context) -> RuleProcessResult
fn process(&self, block: &mut Block, context: &mut Context) -> RuleProcessResult
This method should mutate the given block to apply the rule.
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Box<dyn Rule>
impl<'de> Deserialize<'de> for Box<dyn Rule>
sourcefn deserialize<D: Deserializer<'de>>(
deserializer: D
) -> Result<Box<dyn Rule>, D::Error>
fn deserialize<D: Deserializer<'de>>(
deserializer: D
) -> Result<Box<dyn Rule>, D::Error>
Deserialize this value from the given Serde deserializer. Read more