RuleConfiguration

Trait RuleConfiguration 

Source
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 { ... }
}
Expand description

Defines the configuration interface for rules.

This trait provides methods for configuring rules through properties and serializing their configuration state.

Required Methods§

Source

fn configure( &mut self, properties: RuleProperties, ) -> Result<(), RuleConfigurationError>

Configures the rule with the given properties.

Returns an error if the configuration is invalid.

Source

fn get_name(&self) -> &'static str

Returns the unique name of the rule.

Source

fn serialize_to_properties(&self) -> RuleProperties

Serializes the rule’s configuration to properties.

Only properties that differ from their default values are included.

Provided Methods§

Source

fn has_properties(&self) -> bool

Returns whether the rule has any non-default properties.

Implementors§

Source§

impl RuleConfiguration for AppendTextComment

Source§

impl RuleConfiguration for ComputeExpression

Source§

impl RuleConfiguration for ConvertIndexToField

Source§

impl RuleConfiguration for ConvertLocalFunctionToAssign

Source§

impl RuleConfiguration for ConvertLuauNumber

Source§

impl RuleConfiguration for ConvertRequire

Source§

impl RuleConfiguration for ConvertSquareRootCall

Source§

impl RuleConfiguration for FilterAfterEarlyReturn

Source§

impl RuleConfiguration for GroupLocalAssignment

Source§

impl RuleConfiguration for InjectGlobalValue

Source§

impl RuleConfiguration for RemoveAssertions

Source§

impl RuleConfiguration for RemoveComments

Source§

impl RuleConfiguration for RemoveCompoundAssignment

Source§

impl RuleConfiguration for RemoveContinue

Source§

impl RuleConfiguration for RemoveDebugProfiling

Source§

impl RuleConfiguration for RemoveEmptyDo

Source§

impl RuleConfiguration for RemoveFloorDivision

Source§

impl RuleConfiguration for RemoveFunctionCallParens

Source§

impl RuleConfiguration for RemoveIfExpression

Source§

impl RuleConfiguration for RemoveInterpolatedString

Source§

impl RuleConfiguration for RemoveMethodCall

Source§

impl RuleConfiguration for RemoveMethodDefinition

Source§

impl RuleConfiguration for RemoveNilDeclaration

Source§

impl RuleConfiguration for RemoveSpaces

Source§

impl RuleConfiguration for RemoveTypes

Source§

impl RuleConfiguration for RemoveUnusedIfBranch

Source§

impl RuleConfiguration for RemoveUnusedVariable

Source§

impl RuleConfiguration for RemoveUnusedWhile

Source§

impl RuleConfiguration for RenameVariables