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 copy 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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