Enum BinOp

#[non_exhaustive]
pub enum BinOp

A binary operator: +, +=, &.

Variants

Add(Plus)

The + operator (addition)

Sub(Minus)

The - operator (subtraction)

Mul(Star)

The * operator (multiplication)

Div(Slash)

The / operator (division)

Rem(Percent)

The % operator (modulus)

And(AndAnd)

The && operator (logical and)

Or(OrOr)

The || operator (logical or)

BitXor(Caret)

The ^ operator (bitwise xor)

BitAnd(And)

The & operator (bitwise and)

BitOr(Or)

The | operator (bitwise or)

Shl(Shl)

The << operator (shift left)

Shr(Shr)

The >> operator (shift right)

Eq(EqEq)

The == operator (equality)

Lt(Lt)

The < operator (less than)

Le(Le)

The <= operator (less than or equal to)

Ne(Ne)

The != operator (not equal to)

Ge(Ge)

The >= operator (greater than or equal to)

Gt(Gt)

The > operator (greater than)

AddAssign(PlusEq)

The += operator

SubAssign(MinusEq)

The -= operator

MulAssign(StarEq)

The *= operator

DivAssign(SlashEq)

The /= operator

RemAssign(PercentEq)

The %= operator

BitXorAssign(CaretEq)

The ^= operator

BitAndAssign(AndEq)

The &= operator

BitOrAssign(OrEq)

The |= operator

ShlAssign(ShlEq)

The <<= operator

ShrAssign(ShrEq)

The >>= operator

Trait Implementations

impl Clone for BinOp

fn clone(&self) -> Self

impl Copy for BinOp

impl Parse for BinOp

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

impl ToTokens for BinOp

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

Auto Trait Implementations

impl !Send for BinOp

impl !Sync for BinOp

impl Freeze for BinOp

impl RefUnwindSafe for BinOp

impl Unpin for BinOp

impl UnsafeUnpin for BinOp

impl UnwindSafe for BinOp

Blanket Implementations

impl<T> Any for BinOp where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for BinOp where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for BinOp where T: ?Sized,

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

impl<T> CloneToUninit for BinOp where T: Clone,

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

impl<T> From<T> for BinOp

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> Spanned for BinOp where T: Spanned + ?Sized,

fn span(&self) -> Span

impl<T> ToOwned for BinOp where T: Clone,

type Owned = T;
fn to_owned(&self) -> T
fn clone_into(&self, target: &mut T)

impl<T, U> Into<U> for BinOp where U: From<T>,

fn into(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<U> for BinOp where U: Into<T>,

type Error = never;
fn try_from(value: U) -> Result<T, never>

impl<T, U> TryInto<U> for BinOp where U: TryFrom<T>,

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