Struct rcalc_lib::parse::CalcState[][src]

pub struct CalcState {
    pub has_alt: bool,
    pub alt_result: String,
    // some fields omitted
}
Expand description

holds the current state of the engine, e.g list of all previously used variables

Fields

has_alt: boolalt_result: String

Implementations

Returns a constant value by its name. Name is caseinsensitive

Returns a variable value by its name. Name is caseinsensitive

Creates a new variable or replace existing one with a new value. The function does not check variable’s name for validity. In case of its name conflicts with existing function name, the variable will be inaccessible from expression evaluator

Returns the result of the last successful evaluation

Check if variable name is valid:

  • name convention
  • does not conflict with any constant
  • does not conflist with any function
  • does not conflict with special variables, like ans

Trait Implementations

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.