struct Constant
extension Constant : Equatable, Expression, Sendable
Represents 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
a
andb
,a == b
implies thata != b
isfalse
.Declaration
Swift
static func == (lhs: Constant, rhs: Constant) -> Bool
Parameters
lhs
A value to compare.
rhs
Another 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
value
to 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