pub enum EquationError {
BuildEvalexprError(EvalexprError<DefaultNumericTypes>),
BuildJITError(ConvertError),
BuildFunctionError(BuilderError),
DerivativeNotFound(String),
InvalidInputLength {
expected: usize,
got: usize,
},
VariableNotFound(String),
InvalidOutputLength {
expected: usize,
got: usize,
},
MatrixOutputRequired,
InvalidMatrixDimensions {
expected_rows: usize,
expected_cols: usize,
got_rows: usize,
got_cols: usize,
},
}Expand description
High-level errors that can occur when working with mathematical equations.
This enum represents the various ways that equation parsing, compilation, and differentiation can fail. It wraps lower-level errors from the expression conversion and JIT compilation stages.
Variants§
BuildEvalexprError(EvalexprError<DefaultNumericTypes>)
Error when parsing the initial expression string with evalexpr
BuildJITError(ConvertError)
Error when converting from evalexpr AST to our internal JIT-compatible AST representation
BuildFunctionError(BuilderError)
Error when JIT compiling the expression
DerivativeNotFound(String)
Error when trying to get derivative for a variable that doesn’t exist
InvalidInputLength
Error when the input length is not the same as the number of variables
VariableNotFound(String)
Error when a variable is not found in the equation
InvalidOutputLength
Error when the output length is not the same as the number of equations
MatrixOutputRequired
Error when the output type is wrong
InvalidMatrixDimensions
Error when the matrix dimensions are invalid
Trait Implementations§
Source§impl Debug for EquationError
impl Debug for EquationError
Source§impl Display for EquationError
impl Display for EquationError
Source§impl Error for EquationError
impl Error for EquationError
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
Source§impl From<BuilderError> for EquationError
impl From<BuilderError> for EquationError
Source§fn from(source: BuilderError) -> Self
fn from(source: BuilderError) -> Self
Source§impl From<ConvertError> for EquationError
impl From<ConvertError> for EquationError
Source§fn from(source: ConvertError) -> Self
fn from(source: ConvertError) -> Self
Source§impl From<EvalexprError> for EquationError
impl From<EvalexprError> for EquationError
Source§fn from(source: EvalexprError<DefaultNumericTypes>) -> Self
fn from(source: EvalexprError<DefaultNumericTypes>) -> Self
Auto Trait Implementations§
impl Freeze for EquationError
impl !RefUnwindSafe for EquationError
impl Send for EquationError
impl Sync for EquationError
impl Unpin for EquationError
impl !UnwindSafe for EquationError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more