Struct fixed_decimal::LimitError
source · pub struct LimitError;
Expand description
The magnitude or number of digits exceeds the limit of the FixedDecimal
.
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 FixedDecimal
with a
fractional part.
§Examples
use fixed_decimal::FixedDecimal;
use fixed_decimal::LimitError;
let mut dec1 = FixedDecimal::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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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