#[non_exhaustive]pub enum Problem {
Show 14 variants
ParseError,
SqrtNegative,
DivideByZero,
NotFound,
InsufficientParameters,
NotANumber,
Infinity,
BadFraction,
BadDecimal,
BadInteger,
OutOfRange,
NotAnInteger,
Exhausted,
UnknownZero,
}Expand description
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
ParseError
Unspecified problem while parsing an expression
SqrtNegative
Tried to take the Square Root of a Negative, these values are Imaginary
DivideByZero
Tried to divide by Zero, also arises if attempting to make a fraction with a zero denominator
NotFound
The specified identifier in an expression was not found
InsufficientParameters
The expression has too few parameters to evaluate
NotANumber
Tried to convert a floating point NaN, which has no equivalent or evaluated the Logarithm of a non-positive value or evaluated some other function outside its domain
Infinity
Tried to convert a floating point Infinity which has no equivalent
BadFraction
When parsing a fraction either the numerator or denominator weren’t decimal digits
BadDecimal
When parsing a decimal there was non-digits on one or both sides of the decimal point
BadInteger
When parsing an integer there were non-digits in the text
OutOfRange
The integer was outside the range for the chosen type
NotAnInteger
The rational was not an integer
Exhausted
Operation was rejected because it was likely to consume all available resources
UnknownZero
A checked operation could not prove that a value was non-zero.
This is distinct from Problem::DivideByZero: exact-real algorithms
sometimes have enough structural information to reject definite zero,
but not enough to certify non-zero without unbounded refinement.
Trait Implementations§
Source§impl Error for Problem
impl Error for Problem
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()