Enum rusymbols::core::Actions[][src]

pub enum Actions {
    Sub,
    Add,
    Mul,
    Div,
    Pow,
    Var(String),
    Val(f64),
    Brackets(Box<Expression>, Brackets),
}

Available math actions and service information.

These “actions” can be compared with each other to determine priority. The higher the priority, the earlier the value will be calculated.

Variants

Sub

subtraction “-

Add

addition “+

Mul

multiplication “*

Div

division “/

Pow

exponentiation “**

Var(String)

Not really an action - it’s a variable literal

Val(f64)

It’s also not really an action - it’s just a value or a number.

Brackets(Box<Expression>, Brackets)

Expression in parentheses. Brackets also shows the shape of the brackets.

Trait Implementations

impl Clone for Actions[src]

impl Debug for Actions[src]

impl Default for Actions[src]

impl Display for Actions[src]

impl PartialEq<Actions> for Actions[src]

These “actions” can be compared with each other to determine priority. The higher the priority, the earlier the value will be calculated.

Examples

use rusymbols::core::Actions;
assert_eq!(Actions::Add, Actions::Sub); // Subtraction and addition have equal priority.
assert_ne!(Actions::Add, Actions::Mul); // Addition and multiplication have different priorities.

impl PartialOrd<Actions> for Actions[src]

These “actions” can be compared with each other to determine priority. The higher the priority, the earlier the value will be calculated.

#Example:

use rusymbols::core::Actions;
assert!(Actions::Add < Actions::Mul); // Subtraction and addition have equal priority.
assert!(Actions::Mul < Actions::Pow); // Addition and multiplication have different priorities.

Auto Trait Implementations

impl RefUnwindSafe for Actions

impl Send for Actions

impl Sync for Actions

impl Unpin for Actions

impl UnwindSafe for Actions

Blanket Implementations

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

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

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

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

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

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

type Owned = T

The resulting type after obtaining ownership.

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

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.

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.