Enum BinOp

enum BinOp

A binary operator: +, +=, &.

Variants

Add($crate::token::Plus)

The + operator (addition)

Sub($crate::token::Minus)

The - operator (subtraction)

Mul($crate::token::Star)

The * operator (multiplication)

Div($crate::token::Slash)

The / operator (division)

Rem($crate::token::Percent)

The % operator (modulus)

And($crate::token::AndAnd)

The && operator (logical and)

Or($crate::token::OrOr)

The || operator (logical or)

BitXor($crate::token::Caret)

The ^ operator (bitwise xor)

BitAnd($crate::token::And)

The & operator (bitwise and)

BitOr($crate::token::Or)

The | operator (bitwise or)

Shl($crate::token::Shl)

The << operator (shift left)

Shr($crate::token::Shr)

The >> operator (shift right)

Eq($crate::token::EqEq)

The == operator (equality)

Lt($crate::token::Lt)

The < operator (less than)

Le($crate::token::Le)

The <= operator (less than or equal to)

Ne($crate::token::Ne)

The != operator (not equal to)

Ge($crate::token::Ge)

The >= operator (greater than or equal to)

Gt($crate::token::Gt)

The > operator (greater than)

AddAssign($crate::token::PlusEq)

The += operator

SubAssign($crate::token::MinusEq)

The -= operator

MulAssign($crate::token::StarEq)

The *= operator

DivAssign($crate::token::SlashEq)

The /= operator

RemAssign($crate::token::PercentEq)

The %= operator

BitXorAssign($crate::token::CaretEq)

The ^= operator

BitAndAssign($crate::token::AndEq)

The &= operator

BitOrAssign($crate::token::OrEq)

The |= operator

ShlAssign($crate::token::ShlEq)

The <<= operator

ShrAssign($crate::token::ShrEq)

The >>= operator

Implementations

impl Clone for BinOp

fn clone(self: &Self) -> Self

impl Copy for BinOp

impl Debug for BinOp

fn fmt(self: &Self, formatter: &mut Formatter<'_>) -> Result

impl Eq for BinOp

impl Freeze for BinOp

impl Hash for BinOp

fn hash<H>(self: &Self, state: &mut H)
where
    H: Hasher

impl Parse for BinOp

fn parse(input: ParseStream<'_>) -> Result<Self>

impl PartialEq for BinOp

fn eq(self: &Self, other: &Self) -> bool

impl RefUnwindSafe for BinOp

impl Send for BinOp

impl Sync for BinOp

impl ToTokens for BinOp

fn to_tokens(self: &Self, tokens: &mut TokenStream)

impl Unpin for BinOp

impl UnsafeUnpin for BinOp

impl UnwindSafe for BinOp

impl<T> Any for BinOp

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for BinOp

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for BinOp

fn borrow_mut(self: &mut Self) -> &mut T

impl<T> CloneToUninit for BinOp

unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)

impl<T> From for BinOp

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> Spanned for BinOp

fn span(self: &Self) -> Span

impl<T> ToOwned for BinOp

fn to_owned(self: &Self) -> T
fn clone_into(self: &Self, target: &mut T)

impl<T, U> Into for BinOp

fn into(self: Self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom for BinOp

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto for BinOp

fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>