Enum xxcalc::EvaluationError
[−]
[src]
pub enum EvaluationError { UnknownSymbol(String, usize), ArgumentMissing(String, usize, usize), MultipleExpressions, ConflictingName(String), PolynomialError(PolynomialError), SolvingError(SolvingError), NonConstantExponent, NonNaturalExponent, }
An error that occurs during token reduction, usually by an evaluator.
Variants
UnknownSymbol(String, usize)
Encountered an operator, a constant or a function with no meaning to the evaluator. Most probably such symbol must be registered beforehand. The identifier is a first argument, while its position is the last one.
ArgumentMissing(String, usize, usize)
Number of provided arguments for a function or an operator are not enough (the function is registered with larger arity). The symbol is a first argument, expected arity is a second argument, while the position is the last one.
MultipleExpressions
Multiple expressions where encountered, where not expected (as in too many arguments or too many complete expressions).
ConflictingName(String)
A symbol with given name is conflicting with already registered function or constant.
PolynomialError(PolynomialError)
Wraps polynomial error which could be encountered during the evaluation as result of some mathematical operation.
SolvingError(SolvingError)
Wraps linear solver error which could be encountered when assumptions needed for solving are not met.
NonConstantExponent
Used when exponent is of greater degree than zero. Result of such exponentiation would not be a polynomial anylonger.
NonNaturalExponent
Used when exponent is not a natural number, while the base of exponentiation is not a constant. Result of such operations would not be a polynomial anylonger.
Trait Implementations
impl From<PolynomialError> for EvaluationError
[src]
Encloses PolynomialError
into an EvaluationError
fn from(e: PolynomialError) -> EvaluationError
Performs the conversion.
impl Debug for EvaluationError
[src]
impl PartialEq for EvaluationError
[src]
fn eq(&self, __arg_0: &EvaluationError) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &EvaluationError) -> bool
This method tests for !=
.