Enum cedar_policy_core::ast::BinaryOp
source · pub enum BinaryOp {
Eq,
Less,
LessEq,
Add,
Sub,
Mul,
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
Mul
Integer multiplication
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
Trait Implementations§
source§impl<'de> Deserialize<'de> for BinaryOp
impl<'de> Deserialize<'de> for BinaryOp
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Copy for BinaryOp
impl Eq for BinaryOp
impl StructuralPartialEq for BinaryOp
Auto Trait Implementations§
impl Freeze for BinaryOp
impl RefUnwindSafe for BinaryOp
impl Send for BinaryOp
impl Sync for BinaryOp
impl Unpin for BinaryOp
impl UnwindSafe for BinaryOp
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more