Contents

init(for:values:default:)

Create a definition that constrains an attribute’s value to a defined set of allowed values.

Declaration

init(for attribute: AttributeKey.Type, values allowedValues: Set<AttributeKey.Value?>, default defaultValue: AttributeKey.Value?)

Parameters

  • allowedValues:

    A set of values that are permitted.

  • defaultValue:

    A single permitted value that is used to replace any values that are not in the set of allowedValues.