pub enum DecimalError {
ScaleOutOfRange {
scale: i8,
},
PrecisionOverflow {
value: i128,
scale: i8,
},
Overflow,
DivisionByZero,
InexactRescale {
from: i8,
to: i8,
},
}Expand description
Errors that can occur while manipulating decimal values.
Variants§
ScaleOutOfRange
Requested scale falls outside the supported range.
PrecisionOverflow
Result exceeded the maximum representable precision.
Overflow
Arithmetic operation overflowed the Decimal128 range.
DivisionByZero
Attempted to divide by zero.
InexactRescale
Rescale operation attempted to lower scale without exact divisibility.
Trait Implementations§
Source§impl Clone for DecimalError
impl Clone for DecimalError
Source§fn clone(&self) -> DecimalError
fn clone(&self) -> DecimalError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DecimalError
impl Debug for DecimalError
Source§impl Display for DecimalError
impl Display for DecimalError
Source§impl Error for DecimalError
impl Error for DecimalError
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()
Source§impl PartialEq for DecimalError
impl PartialEq for DecimalError
impl Eq for DecimalError
impl StructuralPartialEq for DecimalError
Auto Trait Implementations§
impl Freeze for DecimalError
impl RefUnwindSafe for DecimalError
impl Send for DecimalError
impl Sync for DecimalError
impl Unpin for DecimalError
impl UnwindSafe for DecimalError
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