RuleConfiguration

public protocol RuleConfiguration : InlinableOptionType

A configuration value for a rule to allow users to modify its behavior.

  • The type of the rule that’s using this configuration.

    Declaration

    Swift

    associatedtype Parent : Rule
  • parameterDescription Default implementation

    A description for this configuration’s parameters. It can be built using the annotated result builder.

    Default Implementation

    Declaration

    Swift

    @RuleConfigurationDescriptionBuilder
    var parameterDescription: RuleConfigurationDescription? { get }
  • Apply an untyped configuration to the current value.

    Throws

    Throws if the configuration is not in the expected format.

    Declaration

    Swift

    mutating func apply(configuration: Any) throws

    Parameters

    configuration

    The untyped configuration value to apply.

  • Whether the specified configuration is equivalent to the current value.

    Declaration

    Swift

    func isEqualTo(_ ruleConfiguration: some RuleConfiguration) -> Bool

    Parameters

    ruleConfiguration

    The rule configuration to compare against.

    Return Value

    Whether the specified configuration is equivalent to the current value.

RuleConfiguration conformances