Enum cedar_policy_core::ast::BinaryOp
source · pub enum BinaryOp {
Eq,
Less,
LessEq,
Add,
Sub,
In,
Contains,
ContainsAll,
ContainsAny,
}
Expand description
Built-in operators with exactly two arguments
Variants§
Eq
Equality
Works on arguments of any type, ie “total equality”. If you compare
things of different types, Eq
will return false
, rather than error.
Less
<
Arguments must have Long type
LessEq
<=
Arguments must have Long type
Add
Integer addition
Arguments must have Long type
Sub
Integer subtraction
Arguments must have Long type
In
Hierarchy membership. Specifically, is the first arg a member of the second.
First argument must have Entity type.
Second argument must either have Entity type, or Set type where the
set elements all have Entity type. If it’s a set, the semantics is
“is the first argument in
any element of the given set”
Contains
Set membership.
First argument must have Set type.
ContainsAll
ContainsAll test for sets. Specifically, if the first set contains the second arg.
Arguments must have Set type
ContainsAny
ContainsAny test for sets (is the intersection empty?)
Arguments must have Set type