AcceptableByConfigurationElement
public protocol AcceptableByConfigurationElement
Type of an object that can be used as a configuration element.
-
Initializer taking a value from a configuration to create an element of
Self.Declaration
Swift
init(fromAny value: Any, context ruleID: String) throwsParameters
valueValue from a configuration.
ruleIDThe rule’s identifier in which context the configuration parsing runs.
-
Make the object an option.
Declaration
Swift
func asOption() -> OptionTypeReturn Value
Option representing the object.
-
asDescription(with:Default implementation) Make the object a description.
Default Implementation
Declaration
Swift
func asDescription(with key: String) -> RuleConfigurationDescriptionParameters
keyName of the option to be put into the description.
Return Value
Configuration description of this object.
-
apply(_:Default implementationruleID: ) Update the object.
Default Implementation
Declaration
Swift
mutating func apply(_ value: Any, ruleID: String) throwsParameters
valueNew underlying data for the object.
ruleIDThe rule’s identifier in which context the configuration parsing runs.
View on GitHub
Install in Dash