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 implementationA 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.
-
asOption()
Extension methodDeclaration
Swift
func asOption() -> OptionType
-
asDescription(with:
Extension method) Declaration
Swift
func asDescription(with key: String) -> RuleConfigurationDescription