pub enum CalcError {
DivisionByZero,
Overflow,
ParseError(String),
EmptyExpression,
InvalidResult(String),
AnomalyViolation(AnomalyViolation),
}Expand description
Calculator error types - exhaustive enum ensures all cases handled
Variants§
DivisionByZero
Division by zero attempted
Overflow
Result overflowed (infinity)
ParseError(String)
Invalid expression syntax
EmptyExpression
Empty expression provided
InvalidResult(String)
Invalid result (NaN or other)
AnomalyViolation(AnomalyViolation)
Anomaly violation detected
Trait Implementations§
Source§impl Error for CalcError
impl Error for CalcError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
impl StructuralPartialEq for CalcError
Auto Trait Implementations§
impl Freeze for CalcError
impl RefUnwindSafe for CalcError
impl Send for CalcError
impl Sync for CalcError
impl Unpin for CalcError
impl UnsafeUnpin for CalcError
impl UnwindSafe for CalcError
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
Mutably borrows from an owned value. Read more