Enum qoqo_calculator::CalculatorError [−][src]
pub enum CalculatorError {
NotConvertable,
FloatSymbolicNotConvertable {
val: String,
},
ComplexSymbolicNotConvertable {
val: CalculatorComplex,
},
ComplexCanNotBeConvertedToFloat {
val: CalculatorComplex,
},
ParsingError {
msg: &'static str,
},
NotImplementedError {
fct: &'static str,
},
FunctionNotFound {
fct: String,
},
VariableNotSet {
name: String,
},
UnexpectedEndOfExpression,
DivisionByZero,
NoValueReturnedParsing,
NotEnoughFunctionArguments,
}
Expand description
Define custom errors for Calculator.
Variants
An input cannot be converted to CalculatorFloat
A symbolic input cannot be converted to CalculatorFloat
Fields of FloatSymbolicNotConvertable
val: String
Value that can not be converted
A symbolic input cannot be converted to CalculatorComplex
Fields of ComplexSymbolicNotConvertable
val: CalculatorComplex
Value that cannot be converted
A complex value cannot be converted to float because imaginary part is not zero
Fields of ComplexCanNotBeConvertedToFloat
val: CalculatorComplex
Value of the CalculatorComplex that cannot be converted
Parsing error when using Calculator
Fields of ParsingError
msg: &'static str
Parsing error
Function not implemented in Calculator
Fields of NotImplementedError
fct: &'static str
Function that is not implemented
Function not found in Calculator
Fields of FunctionNotFound
fct: String
Name of function that cannot be found
A variable is not set
Fields of VariableNotSet
name: String
Name of the variable that is not set
Parsed expression ended unexpectedly
Trying to divide by zero
A parsed value did not return a value.
Not enough function arguments provided in parsed expression.
Trait Implementations
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.