pub struct LimitError;
Expand description
The magnitude or number of digits exceeds the limit of the UnsignedDecimal
or Decimal
.
The highest
magnitude of the most significant digit is i16::MAX
, and the lowest magnitude of the
least significant digit is i16::MIN
.
This error is also returned when constructing a FixedInteger
from a Decimal
with a
fractional part.
§Examples
use fixed_decimal::Decimal;
use fixed_decimal::LimitError;
let mut dec1 = Decimal::from(123);
dec1.multiply_pow10(i16::MAX);
assert!(dec1.is_zero());
Trait Implementations§
Source§impl Clone for LimitError
impl Clone for LimitError
Source§fn clone(&self) -> LimitError
fn clone(&self) -> LimitError
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 LimitError
impl Debug for LimitError
Source§impl Display for LimitError
impl Display for LimitError
Source§impl PartialEq for LimitError
impl PartialEq for LimitError
impl Copy for LimitError
impl StructuralPartialEq for LimitError
Auto Trait Implementations§
impl Freeze for LimitError
impl RefUnwindSafe for LimitError
impl Send for LimitError
impl Sync for LimitError
impl Unpin for LimitError
impl UnwindSafe for LimitError
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