struct Constantextension Constant : Equatable, Expression, SendableRepresents a constant.
Constant is often used as the second operand in expressions. For instance: Equals(operand1: Reference() , operand2: Constant(true)).
-
The value this constant represents.
Declaration
Swift
let value: AnyAutomationValue -
Returns a Boolean value indicating whether two values are equal.
Equality is the inverse of inequality. For any values
aandb,a == bimplies thata != bisfalse.Declaration
Swift
static func == (lhs: Constant, rhs: Constant) -> BoolParameters
lhsA value to compare.
rhsAnother value to compare.
-
Returns the associated value of the constant.
This property can be used in place of having to switch over every case in
valueto extract the associated value.Declaration
Swift
var associatedValue: Any? { get } -
Returns true if the expressions are equal, false otherwise.
Declaration
Swift
func isEqual(to other: any Expression) -> Bool