pub enum Fault {
DivisionByZero,
Limit,
}Expand description
Why an arithmetic operation produced no value.
data.md makes a zero divisor the only operation on its types that faults.
The evaluator turns either of these into a fault; neither is a value a
program can observe.
Variants§
DivisionByZero
int.div, % or / was given a zero divisor.
Limit
The exact result exists but its scale cannot be represented: a
Decimal whose power of ten falls outside a signed 64-bit exponent.
This is the exponent limit execution.md sets, not a rule about the
number.
Trait Implementations§
impl Copy for Fault
impl Eq for Fault
Source§impl Error for Fault
impl Error for Fault
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 Fault
Auto Trait Implementations§
impl Forget for Fault
impl Freeze for Fault
impl Move for Fault
impl RefUnwindSafe for Fault
impl Send for Fault
impl Sync for Fault
impl Unpin for Fault
impl UnsafeUnpin for Fault
impl UnwindSafe for Fault
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