RuleConfiguration
public protocol RuleConfiguration<Parent>
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
-
A human-readable description for this configuration and its applied values.
Declaration
Swift
var consoleDescription: String { 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.