pub enum BinaryOp {
Eq,
Less,
LessEq,
Add,
Sub,
Mul,
In,
Contains,
ContainsAll,
ContainsAny,
GetTag,
HasTag,
}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
GetTag
Get a tag of an entity.
First argument must have Entity type, second argument must have String type.
HasTag
Does the given expr have the given tag?
First argument must have Entity type, second argument must have String type.
Trait Implementations§
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§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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