enum Constraintextension Constraint : Equatable, Hashable, SendableConstraints on a trait attribute, command parameter or event field. Represents the possible values that an attribute, parameter or field can have.
-
A constraint on a Boolean field.
Declaration
Swift
case booleanConstraint -
A constraint on a Byte field.
Declaration
Swift
case byteConstraint(minLength: UInt32, maxLength: UInt32) -
A constraint on a String field.
Declaration
Swift
case stringConstraint(minLength: UInt32 = 0, maxLength: UInt32 = 256, disallowedValues: [String], disallowedValuesCaseSensitive: Bool = false, regex: String = "") -
A constraint on a StringAllowList field.
Declaration
Swift
case stringAllowListConstraint(values: [String], caseSensitive: Bool = false) -
Undocumented
Declaration
Swift
indirect case listConstraint(elementConstraint: Constraint) -
A constraint on a Bitmap field.
This is an EXPERIMENTAL feature that may be removed or changed without notice.
Declaration
Swift
case bitmapConstraint(combinedBits: [CombinedBitsDescriptor]) -
A constraint on an Enum field.
Declaration
Swift
case enumConstraint(allowedSet: Set<AnyEnum>) -
A constraint on a
DayOfWeekenum field.Declaration
Swift
case dayOfWeekConstraint(allowedSet: Set<Locale.Weekday>) -
A constraint on a Struct field.
Declaration
Swift
case structConstraint(structFieldConstraint: [AnyField : Constraint]) -
A constraint on an Int range field.
Declaration
Swift
case intRangeConstraint(lowerBound: Int64, upperBound: Int64, step: Int64, unit: ConstraintUnit) -
A constraint on a UInt range field.
Declaration
Swift
case uintRangeConstraint(lowerBound: UInt64, upperBound: UInt64, step: UInt64, unit: ConstraintUnit) -
A constraint on a Double range field.
Declaration
Swift
case doubleRangeConstraint(lowerBound: Double, upperBound: Double, step: Double, unit: ConstraintUnit) -
Undocumented
Declaration
Swift
case uintSetConstraint(allowedSet: Set<UInt64>, unit: ConstraintUnit)