Enum mexprp::Term [] [src]

pub enum Term<N: Num> {
    Num(Answer<N>),
    Operation(Rc<Operate<N>>),
    Function(StringVec<Term<N>>),
    Var(String),
}

The main representation of parsed equations. It is an operand that can contain an operation between more of itself. This form is the only one that can be directly evaluated. Does not include it's own context.

Variants

A number

An operation

A function with the given arguments

A variable

Methods

impl<N: Num + 'static> Term<N>
[src]

[src]

Parse a string into an expression

[src]

Parse a string into an expression with the given context

[src]

Evaluate the term with the default context

[src]

Evaluate the term with the given context

[src]

Express this term as a string

Trait Implementations

impl<N: Debug + Num> Debug for Term<N>
[src]

[src]

Formats the value using the given formatter. Read more

impl<N: Clone + Num> Clone for Term<N>
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl<N: Num + 'static> Display for Term<N>
[src]

[src]

Formats the value using the given formatter. Read more

impl<N: Num> From<Expression<N>> for Term<N>
[src]

[src]

Performs the conversion.

impl<N: Num> From<N> for Term<N>
[src]

[src]

Performs the conversion.

impl<N: Num> From<Answer<N>> for Term<N>
[src]

[src]

Performs the conversion.

Auto Trait Implementations

impl<N> !Send for Term<N>

impl<N> !Sync for Term<N>