Enum syn::BinOp[][src]

pub enum BinOp {
Show 28 variants Add(Add), Sub(Sub), Mul(Star), Div(Div), Rem(Rem), And(AndAnd), Or(OrOr), BitXor(Caret), BitAnd(And), BitOr(Or), Shl(Shl), Shr(Shr), Eq(EqEq), Lt(Lt), Le(Le), Ne(Ne), Ge(Ge), Gt(Gt), AddEq(AddEq), SubEq(SubEq), MulEq(MulEq), DivEq(DivEq), RemEq(RemEq), BitXorEq(CaretEq), BitAndEq(AndEq), BitOrEq(OrEq), ShlEq(ShlEq), ShrEq(ShrEq),
}
This is supported on crate features full or derive only.
Expand description

A binary operator: +, +=, &.

This type is available only if Syn is built with the "derive" or "full" feature.

Variants

Add(Add)

The + operator (addition)

Tuple Fields of Add

0: Add
Sub(Sub)

The - operator (subtraction)

Tuple Fields of Sub

0: Sub
Mul(Star)

The * operator (multiplication)

Tuple Fields of Mul

0: Star
Div(Div)

The / operator (division)

Tuple Fields of Div

0: Div
Rem(Rem)

The % operator (modulus)

Tuple Fields of Rem

0: Rem
And(AndAnd)

The && operator (logical and)

Tuple Fields of And

0: AndAnd
Or(OrOr)

The || operator (logical or)

Tuple Fields of Or

0: OrOr
BitXor(Caret)

The ^ operator (bitwise xor)

Tuple Fields of BitXor

0: Caret
BitAnd(And)

The & operator (bitwise and)

Tuple Fields of BitAnd

0: And
BitOr(Or)

The | operator (bitwise or)

Tuple Fields of BitOr

0: Or
Shl(Shl)

The << operator (shift left)

Tuple Fields of Shl

0: Shl
Shr(Shr)

The >> operator (shift right)

Tuple Fields of Shr

0: Shr
Eq(EqEq)

The == operator (equality)

Tuple Fields of Eq

0: EqEq
Lt(Lt)

The < operator (less than)

Tuple Fields of Lt

0: Lt
Le(Le)

The <= operator (less than or equal to)

Tuple Fields of Le

0: Le
Ne(Ne)

The != operator (not equal to)

Tuple Fields of Ne

0: Ne
Ge(Ge)

The >= operator (greater than or equal to)

Tuple Fields of Ge

0: Ge
Gt(Gt)

The > operator (greater than)

Tuple Fields of Gt

0: Gt
AddEq(AddEq)

The += operator

Tuple Fields of AddEq

0: AddEq
SubEq(SubEq)

The -= operator

Tuple Fields of SubEq

0: SubEq
MulEq(MulEq)

The *= operator

Tuple Fields of MulEq

0: MulEq
DivEq(DivEq)

The /= operator

Tuple Fields of DivEq

0: DivEq
RemEq(RemEq)

The %= operator

Tuple Fields of RemEq

0: RemEq
BitXorEq(CaretEq)

The ^= operator

Tuple Fields of BitXorEq

0: CaretEq
BitAndEq(AndEq)

The &= operator

Tuple Fields of BitAndEq

0: AndEq
BitOrEq(OrEq)

The |= operator

Tuple Fields of BitOrEq

0: OrEq
ShlEq(ShlEq)

The <<= operator

Tuple Fields of ShlEq

0: ShlEq
ShrEq(ShrEq)

The >>= operator

Tuple Fields of ShrEq

0: ShrEq

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Write self to the given TokenStream. Read more

Convert self directly into a TokenStream object. Read more

Convert self directly into a TokenStream object. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

This is supported on crate features parsing and printing only.

Returns a Span covering the complete contents of this syntax tree node, or Span::call_site() if this node is empty. Read more

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.