pub struct Decimal { /* fields omitted */ }
Expand description
Represents a decimal number as a coefficient (i128
) combined with a
value (u8
) specifying the number of fractional decimal digits.
The number of fractional digits can be in the range 0 ..
MAX_N_FRAC_DIGITS
.
Returns true if self is equal to zero.
Returns true if self is equal to one.
Returns true if self is less than zero.
Returns true if self is greater than zero.
Returns the absolute value of self
.
Returns the largest integral value <= self
.
let d = Dec!(17.5);
assert_eq!(d.floor().to_string(), "17");
let d = Dec!(-17.050);
assert_eq!(d.floor().to_string(), "-18");
Returns the smallest integral value >= self
.
let d = Dec!(17.5);
assert_eq!(d.ceil().to_string(), "18");
let d = Dec!(-17.50);
assert_eq!(d.ceil().to_string(), "-17");
Returns the integral part of self
.
let d = Dec!(17.5);
assert_eq!(d.trunc().to_string(), "17");
let d = Dec!(-17.55555);
assert_eq!(d.trunc().to_string(), "-17");
Returns the fractional part of self
.
let d = Dec!(17.050);
assert_eq!(d.fract().to_string(), "0.050");
let d = Dec!(-17.5);
assert_eq!(d.fract().to_string(), "-0.5");
Number of fractional decimal digits of self
.
Returns the positional index of the most significant decimal digit of
self
.
Special case: for a value equal to 0 magnitude()
returns 0.
let d = Dec!(123);
assert_eq!(d.magnitude(), 2);
let d = Dec!(0.00123);
assert_eq!(d.magnitude(), -3);
let d = Decimal::ZERO;
assert_eq!(d.magnitude(), 0);
Maximum value representable by Decimal
Minimum value representable by Decimal
Smallest absolute difference between two non-equal values of Decimal
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
Returns the pair of integers with the smallest positive denominator
from those with a ratio equal to self
.
let d = Dec!(12345);
assert_eq!(d.as_integer_ratio(), (12345, 1));
let d = Dec!(28.27095);
assert_eq!(d.as_integer_ratio(), (565419, 20000));
Returns the numerator from the pair of integers with the smallest
positive denominator from those with a ratio equal to self
.
let d = Dec!(12345.0);
assert_eq!(d.numerator(), 12345);
let d = Dec!(28.27095);
assert_eq!(d.numerator(), 565419);
Returns the smallest positive denominator from the pairs of integers
with a ratio equal to self
.
let d = Dec!(12345.00);
assert_eq!(d.denominator(), 1);
let d = Dec!(28.27095);
assert_eq!(d.denominator(), 20000);
The resulting type after applying checked_add
.
Returns Some(self + rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_add
.
Returns Some(self + rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_add
.
Returns Some(self + rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_add
.
Returns Some(self + rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_add
.
Returns Some(self + rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_add
.
Returns Some(self + rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_add
.
Returns Some(self + rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_add
.
Returns Some(self + rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_add
.
Returns Some(self + rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_add
.
Returns Some(self + rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_add
.
Returns Some(self + rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_add
.
Returns Some(self + rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_add
.
Returns Some(self + rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_add
.
Returns Some(self + rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_add
.
Returns Some(self + rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_add
.
Returns Some(self + rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_add
.
Returns Some(self + rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_add
.
Returns Some(self + rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_add
.
Returns Some(self + rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_add
.
Returns Some(self + rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_add
.
Returns Some(self + rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_add
.
Returns Some(self + rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_add
.
Returns Some(self + rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_add
.
Returns Some(self + rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_add
.
Returns Some(self + rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_add
.
Returns Some(self + rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_add
.
Returns Some(self + rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_add
.
Returns Some(self + rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_add
.
Returns Some(self + rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_add
.
Returns Some(self + rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_add
.
Returns Some(self + rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_add
.
Returns Some(self + rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_add
.
Returns Some(self + rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_add
.
Returns Some(self + rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_add
.
Returns Some(self + rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_add
.
Returns Some(self + rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_add
.
Returns Some(self + rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_add
.
Returns Some(self + rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_add
.
Returns Some(self + rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_add
.
Returns Some(self + rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_add
.
Returns Some(self + rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_add
.
Returns Some(self + rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_add
.
Returns Some(self + rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_add
.
Returns Some(self + rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_add
.
Returns Some(self + rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_add
.
Returns Some(self + rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_add
.
Returns Some(self + rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_add
.
Returns Some(self + rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_add
.
Returns Some(self + rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_add
.
Returns Some(self + rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_add
.
Returns Some(self + rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_add
.
Returns Some(self + rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_add
.
Returns Some(self + rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_add
.
Returns Some(self + rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_add
.
Returns Some(self + rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_add
.
Returns Some(self + rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_add
.
Returns Some(self + rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_add
.
Returns Some(self + rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_add
.
Returns Some(self + rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_add
.
Returns Some(self + rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_add
.
Returns Some(self + rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_add
.
Returns Some(self + rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_add
.
Returns Some(self + rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_add
.
Returns Some(self + rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_add
.
Returns Some(self + rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_add
.
Returns Some(self + rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_add
.
Returns Some(self + rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_add
.
Returns Some(self + rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_add
.
Returns Some(self + rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_add
.
Returns Some(self + rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_add
.
Returns Some(self + rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_add
.
Returns Some(self + rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_add
.
Returns Some(self + rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_add
.
Returns Some(self + rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_add
.
Returns Some(self + rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_add
.
Returns Some(self + rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_div
.
Returns Some(self / rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_div
.
Returns Some(self / rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_div
.
Returns Some(self / rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_div
.
Returns Some(self / rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_div
.
Returns Some(self / rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_div
.
Returns Some(self / rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_div
.
Returns Some(self / rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_div
.
Returns Some(self / rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_div
.
Returns Some(self / rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_div
.
Returns Some(self / rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_div
.
Returns Some(self / rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_div
.
Returns Some(self / rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_div
.
Returns Some(self / rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_div
.
Returns Some(self / rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_div
.
Returns Some(self / rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_div
.
Returns Some(self / rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_div
.
Returns Some(self / rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_div
.
Returns Some(self / rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_div
.
Returns Some(self / rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_div
.
Returns Some(self / rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_div
.
Returns Some(self / rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_div
.
Returns Some(self / rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_div
.
Returns Some(self / rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_div
.
Returns Some(self / rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_div
.
Returns Some(self / rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_div
.
Returns Some(self / rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_div
.
Returns Some(self / rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_div
.
Returns Some(self / rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_div
.
Returns Some(self / rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_div
.
Returns Some(self / rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_div
.
Returns Some(self / rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_div
.
Returns Some(self / rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_div
.
Returns Some(self / rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_div
.
Returns Some(self / rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_div
.
Returns Some(self / rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_div
.
Returns Some(self / rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_div
.
Returns Some(self / rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_div
.
Returns Some(self / rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_div
.
Returns Some(self / rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_div
.
Returns Some(self / rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_div
.
Returns Some(self / rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_div
.
Returns Some(self / rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_div
.
Returns Some(self / rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_div
.
Returns Some(self / rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_div
.
Returns Some(self / rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_div
.
Returns Some(self / rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_div
.
Returns Some(self / rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_div
.
Returns Some(self / rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_div
.
Returns Some(self / rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_div
.
Returns Some(self / rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_div
.
Returns Some(self / rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_div
.
Returns Some(self / rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_div
.
Returns Some(self / rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_div
.
Returns Some(self / rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_div
.
Returns Some(self / rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_div
.
Returns Some(self / rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_div
.
Returns Some(self / rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_div
.
Returns Some(self / rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_div
.
Returns Some(self / rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_div
.
Returns Some(self / rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_div
.
Returns Some(self / rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_div
.
Returns Some(self / rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_div
.
Returns Some(self / rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_div
.
Returns Some(self / rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_div
.
Returns Some(self / rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_div
.
Returns Some(self / rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_div
.
Returns Some(self / rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_div
.
Returns Some(self / rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_div
.
Returns Some(self / rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_div
.
Returns Some(self / rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_div
.
Returns Some(self / rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_div
.
Returns Some(self / rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_div
.
Returns Some(self / rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_div
.
Returns Some(self / rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_div
.
Returns Some(self / rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_div
.
Returns Some(self / rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_mul
.
Returns Some(self * rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_mul
.
Returns Some(self * rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_mul
.
Returns Some(self * rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_mul
.
Returns Some(self * rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_mul
.
Returns Some(self * rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_mul
.
Returns Some(self * rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_mul
.
Returns Some(self * rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_mul
.
Returns Some(self * rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_mul
.
Returns Some(self * rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_mul
.
Returns Some(self * rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_mul
.
Returns Some(self * rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_mul
.
Returns Some(self * rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_mul
.
Returns Some(self * rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_mul
.
Returns Some(self * rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_mul
.
Returns Some(self * rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_mul
.
Returns Some(self * rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_mul
.
Returns Some(self * rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_mul
.
Returns Some(self * rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_mul
.
Returns Some(self * rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_mul
.
Returns Some(self * rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_mul
.
Returns Some(self * rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_mul
.
Returns Some(self * rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_mul
.
Returns Some(self * rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_mul
.
Returns Some(self * rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_mul
.
Returns Some(self * rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_mul
.
Returns Some(self * rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_mul
.
Returns Some(self * rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_mul
.
Returns Some(self * rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_mul
.
Returns Some(self * rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_mul
.
Returns Some(self * rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_mul
.
Returns Some(self * rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_mul
.
Returns Some(self * rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_mul
.
Returns Some(self * rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_mul
.
Returns Some(self * rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_mul
.
Returns Some(self * rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_mul
.
Returns Some(self * rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_mul
.
Returns Some(self * rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_mul
.
Returns Some(self * rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_mul
.
Returns Some(self * rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_mul
.
Returns Some(self * rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_mul
.
Returns Some(self * rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_mul
.
Returns Some(self * rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_mul
.
Returns Some(self * rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_mul
.
Returns Some(self * rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_mul
.
Returns Some(self * rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_mul
.
Returns Some(self * rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_mul
.
Returns Some(self * rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_mul
.
Returns Some(self * rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_mul
.
Returns Some(self * rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_mul
.
Returns Some(self * rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_mul
.
Returns Some(self * rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_mul
.
Returns Some(self * rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_mul
.
Returns Some(self * rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_mul
.
Returns Some(self * rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_mul
.
Returns Some(self * rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_mul
.
Returns Some(self * rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_mul
.
Returns Some(self * rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_mul
.
Returns Some(self * rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_mul
.
Returns Some(self * rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_mul
.
Returns Some(self * rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_mul
.
Returns Some(self * rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_mul
.
Returns Some(self * rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_mul
.
Returns Some(self * rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_mul
.
Returns Some(self * rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_mul
.
Returns Some(self * rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_mul
.
Returns Some(self * rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_mul
.
Returns Some(self * rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_mul
.
Returns Some(self * rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_mul
.
Returns Some(self * rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_mul
.
Returns Some(self * rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_mul
.
Returns Some(self * rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_mul
.
Returns Some(self * rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_mul
.
Returns Some(self * rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_mul
.
Returns Some(self * rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_mul
.
Returns Some(self * rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_mul
.
Returns Some(self * rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_rem
.
Returns Some(self % rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_rem
.
Returns Some(self % rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_rem
.
Returns Some(self % rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_rem
.
Returns Some(self % rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_rem
.
Returns Some(self % rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_rem
.
Returns Some(self % rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_rem
.
Returns Some(self % rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_rem
.
Returns Some(self % rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_rem
.
Returns Some(self % rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_rem
.
Returns Some(self % rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_rem
.
Returns Some(self % rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_rem
.
Returns Some(self % rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_rem
.
Returns Some(self % rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_rem
.
Returns Some(self % rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_rem
.
Returns Some(self % rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_rem
.
Returns Some(self % rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_rem
.
Returns Some(self % rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_rem
.
Returns Some(self % rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_rem
.
Returns Some(self % rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_rem
.
Returns Some(self % rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_rem
.
Returns Some(self % rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_rem
.
Returns Some(self % rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_rem
.
Returns Some(self % rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_rem
.
Returns Some(self % rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_rem
.
Returns Some(self % rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_rem
.
Returns Some(self % rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_rem
.
Returns Some(self % rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_rem
.
Returns Some(self % rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_rem
.
Returns Some(self % rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_rem
.
Returns Some(self % rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_rem
.
Returns Some(self % rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_rem
.
Returns Some(self % rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_rem
.
Returns Some(self % rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_rem
.
Returns Some(self % rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_rem
.
Returns Some(self % rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_rem
.
Returns Some(self % rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_rem
.
Returns Some(self % rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_rem
.
Returns Some(self % rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_rem
.
Returns Some(self % rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_rem
.
Returns Some(self % rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_rem
.
Returns Some(self % rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_rem
.
Returns Some(self % rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_rem
.
Returns Some(self % rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_rem
.
Returns Some(self % rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_rem
.
Returns Some(self % rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_rem
.
Returns Some(self % rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_rem
.
Returns Some(self % rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_rem
.
Returns Some(self % rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_rem
.
Returns Some(self % rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_rem
.
Returns Some(self % rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_rem
.
Returns Some(self % rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_rem
.
Returns Some(self % rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_rem
.
Returns Some(self % rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_rem
.
Returns Some(self % rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_rem
.
Returns Some(self % rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_rem
.
Returns Some(self % rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_rem
.
Returns Some(self % rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_rem
.
Returns Some(self % rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_rem
.
Returns Some(self % rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_rem
.
Returns Some(self % rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_rem
.
Returns Some(self % rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_rem
.
Returns Some(self % rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_rem
.
Returns Some(self % rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_rem
.
Returns Some(self % rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_rem
.
Returns Some(self % rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_rem
.
Returns Some(self % rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_rem
.
Returns Some(self % rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_rem
.
Returns Some(self % rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_rem
.
Returns Some(self % rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_rem
.
Returns Some(self % rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_rem
.
Returns Some(self % rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_rem
.
Returns Some(self % rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_rem
.
Returns Some(self % rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_rem
.
Returns Some(self % rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_rem
.
Returns Some(self % rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_rem
.
Returns Some(self % rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_sub
.
Returns Some(self - rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_sub
.
Returns Some(self - rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_sub
.
Returns Some(self - rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_sub
.
Returns Some(self - rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_sub
.
Returns Some(self - rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_sub
.
Returns Some(self - rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_sub
.
Returns Some(self - rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_sub
.
Returns Some(self - rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_sub
.
Returns Some(self - rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_sub
.
Returns Some(self - rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_sub
.
Returns Some(self - rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_sub
.
Returns Some(self - rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_sub
.
Returns Some(self - rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_sub
.
Returns Some(self - rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_sub
.
Returns Some(self - rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_sub
.
Returns Some(self - rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_sub
.
Returns Some(self - rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_sub
.
Returns Some(self - rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_sub
.
Returns Some(self - rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_sub
.
Returns Some(self - rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_sub
.
Returns Some(self - rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_sub
.
Returns Some(self - rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_sub
.
Returns Some(self - rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_sub
.
Returns Some(self - rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_sub
.
Returns Some(self - rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_sub
.
Returns Some(self - rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_sub
.
Returns Some(self - rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_sub
.
Returns Some(self - rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_sub
.
Returns Some(self - rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_sub
.
Returns Some(self - rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_sub
.
Returns Some(self - rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_sub
.
Returns Some(self - rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_sub
.
Returns Some(self - rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_sub
.
Returns Some(self - rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_sub
.
Returns Some(self - rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_sub
.
Returns Some(self - rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_sub
.
Returns Some(self - rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_sub
.
Returns Some(self - rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_sub
.
Returns Some(self - rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_sub
.
Returns Some(self - rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_sub
.
Returns Some(self - rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_sub
.
Returns Some(self - rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_sub
.
Returns Some(self - rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_sub
.
Returns Some(self - rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_sub
.
Returns Some(self - rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_sub
.
Returns Some(self - rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_sub
.
Returns Some(self - rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_sub
.
Returns Some(self - rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_sub
.
Returns Some(self - rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_sub
.
Returns Some(self - rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_sub
.
Returns Some(self - rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_sub
.
Returns Some(self - rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_sub
.
Returns Some(self - rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_sub
.
Returns Some(self - rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_sub
.
Returns Some(self - rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_sub
.
Returns Some(self - rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_sub
.
Returns Some(self - rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_sub
.
Returns Some(self - rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_sub
.
Returns Some(self - rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_sub
.
Returns Some(self - rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_sub
.
Returns Some(self - rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_sub
.
Returns Some(self - rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_sub
.
Returns Some(self - rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_sub
.
Returns Some(self - rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_sub
.
Returns Some(self - rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_sub
.
Returns Some(self - rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_sub
.
Returns Some(self - rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_sub
.
Returns Some(self - rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_sub
.
Returns Some(self - rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_sub
.
Returns Some(self - rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_sub
.
Returns Some(self - rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_sub
.
Returns Some(self - rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_sub
.
Returns Some(self - rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_sub
.
Returns Some(self - rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_sub
.
Returns Some(self - rhs)
or None
if the result can not be
represented by the Output
type. Read more
The resulting type after applying checked_sub
.
Returns Some(self - rhs)
or None
if the result can not be
represented by the Output
type. Read more
Performs copy-assignment from source
. Read more
Formats the value using the given formatter. Read more
Default value: Decimal::ZERO
Formats the value using the given formatter.
If the format specifies less fractional digits than
self.n_frac_digits()
, the value gets rounded according to the
default rounding mode.
let d = Dec!(-1234.56);
assert_eq!(format!("{}", d), "-1234.56");
assert_eq!(format!("{:014.3}", d), "-000001234.560");
assert_eq!(format!("{:10.1}", d), " -1234.6");
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
The resulting type after applying div_rounded
.
The resulting type after applying div_rounded
.
The resulting type after applying div_rounded
.
The resulting type after applying div_rounded
.
The resulting type after applying div_rounded
.
The resulting type after applying div_rounded
.
The resulting type after applying div_rounded
.
The resulting type after applying div_rounded
.
The resulting type after applying div_rounded
.
The resulting type after applying div_rounded
.
The resulting type after applying div_rounded
.
The resulting type after applying div_rounded
.
The resulting type after applying div_rounded
.
The resulting type after applying div_rounded
.
The resulting type after applying div_rounded
.
The resulting type after applying div_rounded
.
The resulting type after applying div_rounded
.
The resulting type after applying div_rounded
.
The resulting type after applying div_rounded
.
The resulting type after applying div_rounded
.
The resulting type after applying div_rounded
.
The resulting type after applying div_rounded
.
The resulting type after applying div_rounded
.
The resulting type after applying div_rounded
.
The resulting type after applying div_rounded
.
The resulting type after applying div_rounded
.
The resulting type after applying div_rounded
.
The resulting type after applying div_rounded
.
The resulting type after applying div_rounded
.
The resulting type after applying div_rounded
.
The resulting type after applying div_rounded
.
The resulting type after applying div_rounded
.
The resulting type after applying div_rounded
.
The resulting type after applying div_rounded
.
The resulting type after applying div_rounded
.
The resulting type after applying div_rounded
.
The resulting type after applying div_rounded
.
The resulting type after applying div_rounded
.
The resulting type after applying div_rounded
.
The resulting type after applying div_rounded
.
The resulting type after applying div_rounded
.
The resulting type after applying div_rounded
.
The resulting type after applying div_rounded
.
The resulting type after applying div_rounded
.
The resulting type after applying div_rounded
.
The resulting type after applying div_rounded
.
The resulting type after applying div_rounded
.
The resulting type after applying div_rounded
.
The resulting type after applying div_rounded
.
The resulting type after applying div_rounded
.
The resulting type after applying div_rounded
.
The resulting type after applying div_rounded
.
The resulting type after applying div_rounded
.
The resulting type after applying div_rounded
.
The resulting type after applying div_rounded
.
The resulting type after applying div_rounded
.
The resulting type after applying div_rounded
.
The resulting type after applying div_rounded
.
The resulting type after applying div_rounded
.
The resulting type after applying div_rounded
.
The resulting type after applying div_rounded
.
The resulting type after applying div_rounded
.
The resulting type after applying div_rounded
.
The resulting type after applying div_rounded
.
The resulting type after applying div_rounded
.
The resulting type after applying div_rounded
.
The resulting type after applying div_rounded
.
The resulting type after applying div_rounded
.
The resulting type after applying div_rounded
.
The resulting type after applying div_rounded
.
The resulting type after applying div_rounded
.
The resulting type after applying div_rounded
.
The resulting type after applying div_rounded
.
The resulting type after applying div_rounded
.
The resulting type after applying div_rounded
.
The resulting type after applying div_rounded
.
Convert a number literal into a Decimal
.
The literal must be in the form
[+|-]<int>[.<frac>][<e|E>[+|-]<exp>]
or
[+|-].<frac>[<e|E>[+|-]<exp>]
.
The function returns an error in these cases:
- An empty string has been given as
lit
-> ParseDecimalError::Empty
lit
does not fit one of the two forms given above ->
ParseDecimalError::Invalid
- The number of fractional digits in
lit
minus the value of the signed
exponent in lit
exceeds crate::MAX_N_FRAC_DIGITS ->
ParseDecimalError::FracDigitLimitExceeded
- The given decimal literal exceeds the the internal representation of
Decimal
. -> ParseDecimalError::InternalOverflow
let d = Decimal::from_str("38.207")?;
assert_eq!(d.to_string(), "38.207");
let d = Decimal::from_str("-132.02070e-2")?;
assert_eq!(d.to_string(), "-1.3202070");
The associated error which can be returned from parsing.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying mul_rounded
.
Returns self
* rhs
, rounded to n_frac_digits
.
The resulting type after applying mul_rounded
.
Returns self
* rhs
, rounded to n_frac_digits
.
The resulting type after applying mul_rounded
.
Returns self
* rhs
, rounded to n_frac_digits
.
The resulting type after applying mul_rounded
.
Returns self
* rhs
, rounded to n_frac_digits
.
Returns -self.
Panics with ‘attempt to negate with overflow’ when called on a
Decimal
with a coefficient equal to i128::MIN
!
The resulting type after applying the -
operator.
Returns -self.
#Panics
Panics with ‘attempt to negate with overflow’ when called on a
Decimal
with a coefficient equal to i128::MIN
!
The resulting type after applying the -
operator.
Compares and returns the maximum of two values. Read more
Compares and returns the minimum of two values. Read more
Restrict a value to a certain interval. Read more
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
Returns a new Decimal
with its value rounded to n_frac_digits
fractional digits according to the current RoundingMode.
Panics if the resulting value can not be represented by Decimal
!
let d = Dec!(28.27093);
let r = d.round(4);
assert_eq!(r.to_string(), "28.2709");
let r = d.round(1);
assert_eq!(r.to_string(), "28.3");
let r = d.round(0);
assert_eq!(r.to_string(), "28");
let r = d.round(-1);
assert_eq!(r.to_string(), "30");
Returns a new Decimal
instance with its value rounded to
n_frac_digits
fractional digits according to the current
RoundingMode, wrapped in Option::Some
, or Option::None
if the
result can not be represented by Decimal
.
let d = Dec!(28.27093);
let r = d.checked_round(4)?;
assert_eq!(r.to_string(), "28.2709");
let r = d.checked_round(0)?;
assert_eq!(r.to_string(), "28");
let d = Dec!(170141183460469231731687303715884105727);
let r = d.checked_round(-3);
assert!(r.is_none());
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The type returned in the event of a conversion error.
Tries to convert a f32
value f
into a Decimal
.
Returns the value representable as a Decimal
which is nearest to f
,
if such a value exists, wrapped in Result::Ok.
Returns an error (wrapped in Result::Err) in the following cases:
f
is infinite => DecimalError::InfiniteValue
,
f
is Nan => DecimalError::NotANumber
,
f
> Decimal::MAX => DecimalError::InternalOverflow
.
Examples:
let d = Decimal::try_from(-289.5_f32)?;
assert_eq!(d.to_string(), "-289.5");
let d = Decimal::try_from(37.0005003_f32)?;
assert_eq!(d.to_string(), "37.000499725341796875");
The type returned in the event of a conversion error.
Tries to convert a f64
value f
into a Decimal
.
Returns the value representable as a Decimal
which is nearest to f
,
if such a value exists, wrapped in Result::Ok.
Returns an error (wrapped in Result::Err) in the following cases:
f
is infinite => DecimalError::InfiniteValue
,
f
is Nan => DecimalError::NotANumber
,
f
> Decimal::MAX => DecimalError::InternalOverflow
.
Examples:
let d = Decimal::try_from(-289.5_f64)?;
assert_eq!(d.to_string(), "-289.5");
let d = Decimal::try_from(37.0005003_f64)?;
assert_eq!(d.to_string(), "37.000500299999998787825461477041244507");
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
impl<T> Any for T where
T: 'static + ?Sized,
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
impl<T, U> Into<U> for T where
U: From<T>,
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
Uses borrowed data to replace owned data, usually by cloning. Read more
Converts the given value to a String
. Read more
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.