Enum evalexpr::Operator[][src]

pub enum Operator {
Show variants RootNode, Add, Sub, Neg, Mul, Div, Mod, Exp, Eq, Neq, Gt, Lt, Geq, Leq, And, Or, Not, Assign, AddAssign, SubAssign, MulAssign, DivAssign, ModAssign, ExpAssign, AndAssign, OrAssign, Tuple, Chain, Const { value: Value, }, VariableIdentifier { identifier: String, }, FunctionIdentifier { identifier: String, },
}
Expand description

An enum that represents operators in the operator tree.

Variants

RootNode

A root node in the operator tree. The whole expression is stored under a root node, as well as each subexpression surrounded by parentheses.

Add

A binary addition operator.

Sub

A binary subtraction operator.

Neg

A unary negation operator.

Mul

A binary multiplication operator.

Div

A binary division operator.

Mod

A binary modulo operator.

Exp

A binary exponentiation operator.

Eq

A binary equality comparator.

Neq

A binary inequality comparator.

Gt

A binary greater-than comparator.

Lt

A binary lower-than comparator.

Geq

A binary greater-than-or-equal comparator.

Leq

A binary lower-than-or-equal comparator.

And

A binary logical and operator.

Or

A binary logical or operator.

Not

A binary logical not operator.

Assign

A binary assignment operator.

AddAssign

A binary add-assign operator.

SubAssign

A binary subtract-assign operator.

MulAssign

A binary multiply-assign operator.

DivAssign

A binary divide-assign operator.

ModAssign

A binary modulo-assign operator.

ExpAssign

A binary exponentiate-assign operator.

AndAssign

A binary and-assign operator.

OrAssign

A binary or-assign operator.

Tuple

An n-ary tuple constructor.

Chain

An n-ary subexpression chain.

Const

A constant value.

Show fields

Fields of Const

value: Value

The value of the constant.

VariableIdentifier

A variable identifier.

Show fields

Fields of VariableIdentifier

identifier: String

The identifier of the variable.

FunctionIdentifier

A function identifier.

Show fields

Fields of FunctionIdentifier

identifier: String

The identifier of the function.

Trait Implementations

impl Clone for Operator[src]

fn clone(&self) -> Operator[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 Debug for Operator[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl Display for Operator[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>[src]

Formats the value using the given formatter. Read more

impl PartialEq<Operator> for Operator[src]

fn eq(&self, other: &Operator) -> bool[src]

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

fn ne(&self, other: &Operator) -> bool[src]

This method tests for !=.

impl StructuralPartialEq for Operator[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

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

pub fn clone_into(&self, target: &mut T)[src]

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

recently added

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

impl<T> ToString for T where
    T: Display + ?Sized
[src]

pub default fn to_string(&self) -> String[src]

Converts the given value to a String. Read more

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

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

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.