Enum syntax::ast::BinOpKind
[−]
[src]
pub enum BinOpKind { Add, Sub, Mul, Div, Rem, And, Or, BitXor, BitAnd, BitOr, Shl, Shr, Eq, Lt, Le, Ne, Ge, Gt, }
Variants
Add
The +
operator (addition)
Sub
The -
operator (subtraction)
Mul
The *
operator (multiplication)
Div
The /
operator (division)
Rem
The %
operator (modulus)
And
The &&
operator (logical and)
Or
The ||
operator (logical or)
BitXor
The ^
operator (bitwise xor)
BitAnd
The &
operator (bitwise and)
BitOr
The |
operator (bitwise or)
Shl
The <<
operator (shift left)
Shr
The >>
operator (shift right)
Eq
The ==
operator (equality)
Lt
The <
operator (less than)
Le
The <=
operator (less than or equal to)
Ne
The !=
operator (not equal to)
Ge
The >=
operator (greater than or equal to)
Gt
The >
operator (greater than)
Methods
impl BinOpKind
[src]
pub fn to_string(&self) -> &'static str
[src]
pub fn lazy(&self) -> bool
[src]
pub fn is_shift(&self) -> bool
[src]
pub fn is_comparison(&self) -> bool
[src]
pub fn is_by_value(&self) -> bool
[src]
Returns true
if the binary operator takes its arguments by value
Trait Implementations
impl Clone for BinOpKind
[src]
fn clone(&self) -> BinOpKind
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl PartialEq for BinOpKind
[src]
fn eq(&self, __arg_0: &BinOpKind) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl Eq for BinOpKind
[src]
impl Encodable for BinOpKind
[src]
impl Decodable for BinOpKind
[src]
impl Hash for BinOpKind
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
[src]
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Debug for BinOpKind
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more