pub struct Decimal { /* private fields */ }
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
].
Implementations§
source§impl Decimal
impl Decimal
sourcepub const fn is_negative(&self) -> bool
pub const fn is_negative(&self) -> bool
Returns true if self is less than zero.
sourcepub const fn is_positive(&self) -> bool
pub const fn is_positive(&self) -> bool
Returns true if self is greater than zero.
source§impl Decimal
impl Decimal
sourcepub fn floor(&self) -> Decimal
pub fn floor(&self) -> Decimal
Returns the largest integral value <= self
.
Examples
let d = Dec!(17.5);
assert_eq!(d.floor().to_string(), "17");
let d = Dec!(-17.050);
assert_eq!(d.floor().to_string(), "-18");
sourcepub fn ceil(&self) -> Decimal
pub fn ceil(&self) -> Decimal
Returns the smallest integral value >= self
.
Examples
let d = Dec!(17.5);
assert_eq!(d.ceil().to_string(), "18");
let d = Dec!(-17.50);
assert_eq!(d.ceil().to_string(), "-17");
source§impl Decimal
impl Decimal
sourcepub const fn coefficient(self) -> i128
pub const fn coefficient(self) -> i128
Coefficient of self
.
sourcepub const fn n_frac_digits(self) -> u8
pub const fn n_frac_digits(self) -> u8
Number of fractional decimal digits of self
.
sourcepub const fn magnitude(self) -> i8
pub const fn magnitude(self) -> i8
Returns the positional index of the most significant decimal digit of
self
.
Special case: for a value equal to 0 magnitude()
returns 0.
Examples:
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);
sourcepub const MAX: Decimal = Self{ coeff: i128::MAX, n_frac_digits: 0,}
pub const MAX: Decimal = Self{ coeff: i128::MAX, n_frac_digits: 0,}
Maximum value representable by Decimal
Trait Implementations§
source§impl Add<Decimal> for BaseCurrency
impl Add<Decimal> for BaseCurrency
source§impl Add<Decimal> for QuoteCurrency
impl Add<Decimal> for QuoteCurrency
source§impl<T> AddAssign<T> for Decimalwhere
Decimal: Add<T, Output = Decimal>,
impl<T> AddAssign<T> for Decimalwhere Decimal: Add<T, Output = Decimal>,
source§fn add_assign(&mut self, rhs: T)
fn add_assign(&mut self, rhs: T)
+=
operation. Read moresource§impl AsIntegerRatio for Decimal
impl AsIntegerRatio for Decimal
source§fn as_integer_ratio(self) -> (i128, i128)
fn as_integer_ratio(self) -> (i128, i128)
Returns the pair of integers with the smallest positive denominator
from those with a ratio equal to self
.
Examples
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));
source§fn numerator(self) -> i128
fn numerator(self) -> i128
Returns the numerator from the pair of integers with the smallest
positive denominator from those with a ratio equal to self
.
Examples
let d = Dec!(12345.0);
assert_eq!(d.numerator(), 12345);
let d = Dec!(28.27095);
assert_eq!(d.numerator(), 565419);
source§fn denominator(self) -> i128
fn denominator(self) -> i128
Returns the smallest positive denominator from the pairs of integers
with a ratio equal to self
.
Examples
let d = Dec!(12345.00);
assert_eq!(d.denominator(), 1);
let d = Dec!(28.27095);
assert_eq!(d.denominator(), 20000);
source§impl CheckedAdd<&Decimal> for &Decimalwhere
Decimal: CheckedAdd<Decimal>,
impl CheckedAdd<&Decimal> for &Decimalwhere Decimal: CheckedAdd<Decimal>,
§type Output = <Decimal as CheckedAdd<Decimal>>::Output
type Output = <Decimal as CheckedAdd<Decimal>>::Output
checked_add
.source§fn checked_add(self, rhs: &Decimal) -> <&Decimal as CheckedAdd<&Decimal>>::Output
fn checked_add(self, rhs: &Decimal) -> <&Decimal as CheckedAdd<&Decimal>>::Output
Some(self + rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedAdd<&Decimal> for Decimalwhere
Decimal: CheckedAdd<Decimal>,
impl CheckedAdd<&Decimal> for Decimalwhere Decimal: CheckedAdd<Decimal>,
§type Output = <Decimal as CheckedAdd<Decimal>>::Output
type Output = <Decimal as CheckedAdd<Decimal>>::Output
checked_add
.source§fn checked_add(self, rhs: &Decimal) -> <Decimal as CheckedAdd<&Decimal>>::Output
fn checked_add(self, rhs: &Decimal) -> <Decimal as CheckedAdd<&Decimal>>::Output
Some(self + rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedAdd<&i128> for &Decimalwhere
Decimal: CheckedAdd<i128>,
impl CheckedAdd<&i128> for &Decimalwhere Decimal: CheckedAdd<i128>,
source§fn checked_add(self, rhs: &i128) -> <&Decimal as CheckedAdd<&i128>>::Output
fn checked_add(self, rhs: &i128) -> <&Decimal as CheckedAdd<&i128>>::Output
Some(self + rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedAdd<&i128> for Decimalwhere
Decimal: CheckedAdd<i128>,
impl CheckedAdd<&i128> for Decimalwhere Decimal: CheckedAdd<i128>,
source§fn checked_add(self, rhs: &i128) -> <Decimal as CheckedAdd<&i128>>::Output
fn checked_add(self, rhs: &i128) -> <Decimal as CheckedAdd<&i128>>::Output
Some(self + rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedAdd<&i16> for &Decimalwhere
Decimal: CheckedAdd<i16>,
impl CheckedAdd<&i16> for &Decimalwhere Decimal: CheckedAdd<i16>,
source§fn checked_add(self, rhs: &i16) -> <&Decimal as CheckedAdd<&i16>>::Output
fn checked_add(self, rhs: &i16) -> <&Decimal as CheckedAdd<&i16>>::Output
Some(self + rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedAdd<&i16> for Decimalwhere
Decimal: CheckedAdd<i16>,
impl CheckedAdd<&i16> for Decimalwhere Decimal: CheckedAdd<i16>,
source§fn checked_add(self, rhs: &i16) -> <Decimal as CheckedAdd<&i16>>::Output
fn checked_add(self, rhs: &i16) -> <Decimal as CheckedAdd<&i16>>::Output
Some(self + rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedAdd<&i32> for &Decimalwhere
Decimal: CheckedAdd<i32>,
impl CheckedAdd<&i32> for &Decimalwhere Decimal: CheckedAdd<i32>,
source§fn checked_add(self, rhs: &i32) -> <&Decimal as CheckedAdd<&i32>>::Output
fn checked_add(self, rhs: &i32) -> <&Decimal as CheckedAdd<&i32>>::Output
Some(self + rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedAdd<&i32> for Decimalwhere
Decimal: CheckedAdd<i32>,
impl CheckedAdd<&i32> for Decimalwhere Decimal: CheckedAdd<i32>,
source§fn checked_add(self, rhs: &i32) -> <Decimal as CheckedAdd<&i32>>::Output
fn checked_add(self, rhs: &i32) -> <Decimal as CheckedAdd<&i32>>::Output
Some(self + rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedAdd<&i64> for &Decimalwhere
Decimal: CheckedAdd<i64>,
impl CheckedAdd<&i64> for &Decimalwhere Decimal: CheckedAdd<i64>,
source§fn checked_add(self, rhs: &i64) -> <&Decimal as CheckedAdd<&i64>>::Output
fn checked_add(self, rhs: &i64) -> <&Decimal as CheckedAdd<&i64>>::Output
Some(self + rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedAdd<&i64> for Decimalwhere
Decimal: CheckedAdd<i64>,
impl CheckedAdd<&i64> for Decimalwhere Decimal: CheckedAdd<i64>,
source§fn checked_add(self, rhs: &i64) -> <Decimal as CheckedAdd<&i64>>::Output
fn checked_add(self, rhs: &i64) -> <Decimal as CheckedAdd<&i64>>::Output
Some(self + rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedAdd<&i8> for &Decimalwhere
Decimal: CheckedAdd<i8>,
impl CheckedAdd<&i8> for &Decimalwhere Decimal: CheckedAdd<i8>,
source§fn checked_add(self, rhs: &i8) -> <&Decimal as CheckedAdd<&i8>>::Output
fn checked_add(self, rhs: &i8) -> <&Decimal as CheckedAdd<&i8>>::Output
Some(self + rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedAdd<&i8> for Decimalwhere
Decimal: CheckedAdd<i8>,
impl CheckedAdd<&i8> for Decimalwhere Decimal: CheckedAdd<i8>,
source§fn checked_add(self, rhs: &i8) -> <Decimal as CheckedAdd<&i8>>::Output
fn checked_add(self, rhs: &i8) -> <Decimal as CheckedAdd<&i8>>::Output
Some(self + rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedAdd<&u16> for &Decimalwhere
Decimal: CheckedAdd<u16>,
impl CheckedAdd<&u16> for &Decimalwhere Decimal: CheckedAdd<u16>,
source§fn checked_add(self, rhs: &u16) -> <&Decimal as CheckedAdd<&u16>>::Output
fn checked_add(self, rhs: &u16) -> <&Decimal as CheckedAdd<&u16>>::Output
Some(self + rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedAdd<&u16> for Decimalwhere
Decimal: CheckedAdd<u16>,
impl CheckedAdd<&u16> for Decimalwhere Decimal: CheckedAdd<u16>,
source§fn checked_add(self, rhs: &u16) -> <Decimal as CheckedAdd<&u16>>::Output
fn checked_add(self, rhs: &u16) -> <Decimal as CheckedAdd<&u16>>::Output
Some(self + rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedAdd<&u32> for &Decimalwhere
Decimal: CheckedAdd<u32>,
impl CheckedAdd<&u32> for &Decimalwhere Decimal: CheckedAdd<u32>,
source§fn checked_add(self, rhs: &u32) -> <&Decimal as CheckedAdd<&u32>>::Output
fn checked_add(self, rhs: &u32) -> <&Decimal as CheckedAdd<&u32>>::Output
Some(self + rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedAdd<&u32> for Decimalwhere
Decimal: CheckedAdd<u32>,
impl CheckedAdd<&u32> for Decimalwhere Decimal: CheckedAdd<u32>,
source§fn checked_add(self, rhs: &u32) -> <Decimal as CheckedAdd<&u32>>::Output
fn checked_add(self, rhs: &u32) -> <Decimal as CheckedAdd<&u32>>::Output
Some(self + rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedAdd<&u64> for &Decimalwhere
Decimal: CheckedAdd<u64>,
impl CheckedAdd<&u64> for &Decimalwhere Decimal: CheckedAdd<u64>,
source§fn checked_add(self, rhs: &u64) -> <&Decimal as CheckedAdd<&u64>>::Output
fn checked_add(self, rhs: &u64) -> <&Decimal as CheckedAdd<&u64>>::Output
Some(self + rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedAdd<&u64> for Decimalwhere
Decimal: CheckedAdd<u64>,
impl CheckedAdd<&u64> for Decimalwhere Decimal: CheckedAdd<u64>,
source§fn checked_add(self, rhs: &u64) -> <Decimal as CheckedAdd<&u64>>::Output
fn checked_add(self, rhs: &u64) -> <Decimal as CheckedAdd<&u64>>::Output
Some(self + rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedAdd<&u8> for &Decimalwhere
Decimal: CheckedAdd<u8>,
impl CheckedAdd<&u8> for &Decimalwhere Decimal: CheckedAdd<u8>,
source§fn checked_add(self, rhs: &u8) -> <&Decimal as CheckedAdd<&u8>>::Output
fn checked_add(self, rhs: &u8) -> <&Decimal as CheckedAdd<&u8>>::Output
Some(self + rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedAdd<&u8> for Decimalwhere
Decimal: CheckedAdd<u8>,
impl CheckedAdd<&u8> for Decimalwhere Decimal: CheckedAdd<u8>,
source§fn checked_add(self, rhs: &u8) -> <Decimal as CheckedAdd<&u8>>::Output
fn checked_add(self, rhs: &u8) -> <Decimal as CheckedAdd<&u8>>::Output
Some(self + rhs)
or None
if the result can not be
represented by the Output
type.source§impl<'a> CheckedAdd<Decimal> for &'a Decimalwhere
Decimal: CheckedAdd<Decimal>,
impl<'a> CheckedAdd<Decimal> for &'a Decimalwhere Decimal: CheckedAdd<Decimal>,
§type Output = <Decimal as CheckedAdd<Decimal>>::Output
type Output = <Decimal as CheckedAdd<Decimal>>::Output
checked_add
.source§fn checked_add(
self,
rhs: Decimal
) -> <&'a Decimal as CheckedAdd<Decimal>>::Output
fn checked_add( self, rhs: Decimal ) -> <&'a Decimal as CheckedAdd<Decimal>>::Output
Some(self + rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedAdd<Decimal> for Decimal
impl CheckedAdd<Decimal> for Decimal
source§impl<'a> CheckedAdd<i128> for &'a Decimalwhere
Decimal: CheckedAdd<i128>,
impl<'a> CheckedAdd<i128> for &'a Decimalwhere Decimal: CheckedAdd<i128>,
source§fn checked_add(self, rhs: i128) -> <&'a Decimal as CheckedAdd<i128>>::Output
fn checked_add(self, rhs: i128) -> <&'a Decimal as CheckedAdd<i128>>::Output
Some(self + rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedAdd<i128> for Decimal
impl CheckedAdd<i128> for Decimal
source§impl<'a> CheckedAdd<i16> for &'a Decimalwhere
Decimal: CheckedAdd<i16>,
impl<'a> CheckedAdd<i16> for &'a Decimalwhere Decimal: CheckedAdd<i16>,
source§fn checked_add(self, rhs: i16) -> <&'a Decimal as CheckedAdd<i16>>::Output
fn checked_add(self, rhs: i16) -> <&'a Decimal as CheckedAdd<i16>>::Output
Some(self + rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedAdd<i16> for Decimal
impl CheckedAdd<i16> for Decimal
source§impl<'a> CheckedAdd<i32> for &'a Decimalwhere
Decimal: CheckedAdd<i32>,
impl<'a> CheckedAdd<i32> for &'a Decimalwhere Decimal: CheckedAdd<i32>,
source§fn checked_add(self, rhs: i32) -> <&'a Decimal as CheckedAdd<i32>>::Output
fn checked_add(self, rhs: i32) -> <&'a Decimal as CheckedAdd<i32>>::Output
Some(self + rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedAdd<i32> for Decimal
impl CheckedAdd<i32> for Decimal
source§impl<'a> CheckedAdd<i64> for &'a Decimalwhere
Decimal: CheckedAdd<i64>,
impl<'a> CheckedAdd<i64> for &'a Decimalwhere Decimal: CheckedAdd<i64>,
source§fn checked_add(self, rhs: i64) -> <&'a Decimal as CheckedAdd<i64>>::Output
fn checked_add(self, rhs: i64) -> <&'a Decimal as CheckedAdd<i64>>::Output
Some(self + rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedAdd<i64> for Decimal
impl CheckedAdd<i64> for Decimal
source§impl<'a> CheckedAdd<i8> for &'a Decimalwhere
Decimal: CheckedAdd<i8>,
impl<'a> CheckedAdd<i8> for &'a Decimalwhere Decimal: CheckedAdd<i8>,
source§fn checked_add(self, rhs: i8) -> <&'a Decimal as CheckedAdd<i8>>::Output
fn checked_add(self, rhs: i8) -> <&'a Decimal as CheckedAdd<i8>>::Output
Some(self + rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedAdd<i8> for Decimal
impl CheckedAdd<i8> for Decimal
source§impl<'a> CheckedAdd<u16> for &'a Decimalwhere
Decimal: CheckedAdd<u16>,
impl<'a> CheckedAdd<u16> for &'a Decimalwhere Decimal: CheckedAdd<u16>,
source§fn checked_add(self, rhs: u16) -> <&'a Decimal as CheckedAdd<u16>>::Output
fn checked_add(self, rhs: u16) -> <&'a Decimal as CheckedAdd<u16>>::Output
Some(self + rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedAdd<u16> for Decimal
impl CheckedAdd<u16> for Decimal
source§impl<'a> CheckedAdd<u32> for &'a Decimalwhere
Decimal: CheckedAdd<u32>,
impl<'a> CheckedAdd<u32> for &'a Decimalwhere Decimal: CheckedAdd<u32>,
source§fn checked_add(self, rhs: u32) -> <&'a Decimal as CheckedAdd<u32>>::Output
fn checked_add(self, rhs: u32) -> <&'a Decimal as CheckedAdd<u32>>::Output
Some(self + rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedAdd<u32> for Decimal
impl CheckedAdd<u32> for Decimal
source§impl<'a> CheckedAdd<u64> for &'a Decimalwhere
Decimal: CheckedAdd<u64>,
impl<'a> CheckedAdd<u64> for &'a Decimalwhere Decimal: CheckedAdd<u64>,
source§fn checked_add(self, rhs: u64) -> <&'a Decimal as CheckedAdd<u64>>::Output
fn checked_add(self, rhs: u64) -> <&'a Decimal as CheckedAdd<u64>>::Output
Some(self + rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedAdd<u64> for Decimal
impl CheckedAdd<u64> for Decimal
source§impl<'a> CheckedAdd<u8> for &'a Decimalwhere
Decimal: CheckedAdd<u8>,
impl<'a> CheckedAdd<u8> for &'a Decimalwhere Decimal: CheckedAdd<u8>,
source§fn checked_add(self, rhs: u8) -> <&'a Decimal as CheckedAdd<u8>>::Output
fn checked_add(self, rhs: u8) -> <&'a Decimal as CheckedAdd<u8>>::Output
Some(self + rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedAdd<u8> for Decimal
impl CheckedAdd<u8> for Decimal
source§impl CheckedDiv<&Decimal> for &Decimalwhere
Decimal: CheckedDiv<Decimal>,
impl CheckedDiv<&Decimal> for &Decimalwhere Decimal: CheckedDiv<Decimal>,
§type Output = <Decimal as CheckedDiv<Decimal>>::Output
type Output = <Decimal as CheckedDiv<Decimal>>::Output
checked_div
.source§fn checked_div(self, rhs: &Decimal) -> <&Decimal as CheckedDiv<&Decimal>>::Output
fn checked_div(self, rhs: &Decimal) -> <&Decimal as CheckedDiv<&Decimal>>::Output
Some(self / rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedDiv<&Decimal> for Decimalwhere
Decimal: CheckedDiv<Decimal>,
impl CheckedDiv<&Decimal> for Decimalwhere Decimal: CheckedDiv<Decimal>,
§type Output = <Decimal as CheckedDiv<Decimal>>::Output
type Output = <Decimal as CheckedDiv<Decimal>>::Output
checked_div
.source§fn checked_div(self, rhs: &Decimal) -> <Decimal as CheckedDiv<&Decimal>>::Output
fn checked_div(self, rhs: &Decimal) -> <Decimal as CheckedDiv<&Decimal>>::Output
Some(self / rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedDiv<&i128> for &Decimalwhere
Decimal: CheckedDiv<i128>,
impl CheckedDiv<&i128> for &Decimalwhere Decimal: CheckedDiv<i128>,
source§fn checked_div(self, rhs: &i128) -> <&Decimal as CheckedDiv<&i128>>::Output
fn checked_div(self, rhs: &i128) -> <&Decimal as CheckedDiv<&i128>>::Output
Some(self / rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedDiv<&i128> for Decimalwhere
Decimal: CheckedDiv<i128>,
impl CheckedDiv<&i128> for Decimalwhere Decimal: CheckedDiv<i128>,
source§fn checked_div(self, rhs: &i128) -> <Decimal as CheckedDiv<&i128>>::Output
fn checked_div(self, rhs: &i128) -> <Decimal as CheckedDiv<&i128>>::Output
Some(self / rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedDiv<&i16> for &Decimalwhere
Decimal: CheckedDiv<i16>,
impl CheckedDiv<&i16> for &Decimalwhere Decimal: CheckedDiv<i16>,
source§fn checked_div(self, rhs: &i16) -> <&Decimal as CheckedDiv<&i16>>::Output
fn checked_div(self, rhs: &i16) -> <&Decimal as CheckedDiv<&i16>>::Output
Some(self / rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedDiv<&i16> for Decimalwhere
Decimal: CheckedDiv<i16>,
impl CheckedDiv<&i16> for Decimalwhere Decimal: CheckedDiv<i16>,
source§fn checked_div(self, rhs: &i16) -> <Decimal as CheckedDiv<&i16>>::Output
fn checked_div(self, rhs: &i16) -> <Decimal as CheckedDiv<&i16>>::Output
Some(self / rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedDiv<&i32> for &Decimalwhere
Decimal: CheckedDiv<i32>,
impl CheckedDiv<&i32> for &Decimalwhere Decimal: CheckedDiv<i32>,
source§fn checked_div(self, rhs: &i32) -> <&Decimal as CheckedDiv<&i32>>::Output
fn checked_div(self, rhs: &i32) -> <&Decimal as CheckedDiv<&i32>>::Output
Some(self / rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedDiv<&i32> for Decimalwhere
Decimal: CheckedDiv<i32>,
impl CheckedDiv<&i32> for Decimalwhere Decimal: CheckedDiv<i32>,
source§fn checked_div(self, rhs: &i32) -> <Decimal as CheckedDiv<&i32>>::Output
fn checked_div(self, rhs: &i32) -> <Decimal as CheckedDiv<&i32>>::Output
Some(self / rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedDiv<&i64> for &Decimalwhere
Decimal: CheckedDiv<i64>,
impl CheckedDiv<&i64> for &Decimalwhere Decimal: CheckedDiv<i64>,
source§fn checked_div(self, rhs: &i64) -> <&Decimal as CheckedDiv<&i64>>::Output
fn checked_div(self, rhs: &i64) -> <&Decimal as CheckedDiv<&i64>>::Output
Some(self / rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedDiv<&i64> for Decimalwhere
Decimal: CheckedDiv<i64>,
impl CheckedDiv<&i64> for Decimalwhere Decimal: CheckedDiv<i64>,
source§fn checked_div(self, rhs: &i64) -> <Decimal as CheckedDiv<&i64>>::Output
fn checked_div(self, rhs: &i64) -> <Decimal as CheckedDiv<&i64>>::Output
Some(self / rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedDiv<&i8> for &Decimalwhere
Decimal: CheckedDiv<i8>,
impl CheckedDiv<&i8> for &Decimalwhere Decimal: CheckedDiv<i8>,
source§fn checked_div(self, rhs: &i8) -> <&Decimal as CheckedDiv<&i8>>::Output
fn checked_div(self, rhs: &i8) -> <&Decimal as CheckedDiv<&i8>>::Output
Some(self / rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedDiv<&i8> for Decimalwhere
Decimal: CheckedDiv<i8>,
impl CheckedDiv<&i8> for Decimalwhere Decimal: CheckedDiv<i8>,
source§fn checked_div(self, rhs: &i8) -> <Decimal as CheckedDiv<&i8>>::Output
fn checked_div(self, rhs: &i8) -> <Decimal as CheckedDiv<&i8>>::Output
Some(self / rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedDiv<&u16> for &Decimalwhere
Decimal: CheckedDiv<u16>,
impl CheckedDiv<&u16> for &Decimalwhere Decimal: CheckedDiv<u16>,
source§fn checked_div(self, rhs: &u16) -> <&Decimal as CheckedDiv<&u16>>::Output
fn checked_div(self, rhs: &u16) -> <&Decimal as CheckedDiv<&u16>>::Output
Some(self / rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedDiv<&u16> for Decimalwhere
Decimal: CheckedDiv<u16>,
impl CheckedDiv<&u16> for Decimalwhere Decimal: CheckedDiv<u16>,
source§fn checked_div(self, rhs: &u16) -> <Decimal as CheckedDiv<&u16>>::Output
fn checked_div(self, rhs: &u16) -> <Decimal as CheckedDiv<&u16>>::Output
Some(self / rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedDiv<&u32> for &Decimalwhere
Decimal: CheckedDiv<u32>,
impl CheckedDiv<&u32> for &Decimalwhere Decimal: CheckedDiv<u32>,
source§fn checked_div(self, rhs: &u32) -> <&Decimal as CheckedDiv<&u32>>::Output
fn checked_div(self, rhs: &u32) -> <&Decimal as CheckedDiv<&u32>>::Output
Some(self / rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedDiv<&u32> for Decimalwhere
Decimal: CheckedDiv<u32>,
impl CheckedDiv<&u32> for Decimalwhere Decimal: CheckedDiv<u32>,
source§fn checked_div(self, rhs: &u32) -> <Decimal as CheckedDiv<&u32>>::Output
fn checked_div(self, rhs: &u32) -> <Decimal as CheckedDiv<&u32>>::Output
Some(self / rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedDiv<&u64> for &Decimalwhere
Decimal: CheckedDiv<u64>,
impl CheckedDiv<&u64> for &Decimalwhere Decimal: CheckedDiv<u64>,
source§fn checked_div(self, rhs: &u64) -> <&Decimal as CheckedDiv<&u64>>::Output
fn checked_div(self, rhs: &u64) -> <&Decimal as CheckedDiv<&u64>>::Output
Some(self / rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedDiv<&u64> for Decimalwhere
Decimal: CheckedDiv<u64>,
impl CheckedDiv<&u64> for Decimalwhere Decimal: CheckedDiv<u64>,
source§fn checked_div(self, rhs: &u64) -> <Decimal as CheckedDiv<&u64>>::Output
fn checked_div(self, rhs: &u64) -> <Decimal as CheckedDiv<&u64>>::Output
Some(self / rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedDiv<&u8> for &Decimalwhere
Decimal: CheckedDiv<u8>,
impl CheckedDiv<&u8> for &Decimalwhere Decimal: CheckedDiv<u8>,
source§fn checked_div(self, rhs: &u8) -> <&Decimal as CheckedDiv<&u8>>::Output
fn checked_div(self, rhs: &u8) -> <&Decimal as CheckedDiv<&u8>>::Output
Some(self / rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedDiv<&u8> for Decimalwhere
Decimal: CheckedDiv<u8>,
impl CheckedDiv<&u8> for Decimalwhere Decimal: CheckedDiv<u8>,
source§fn checked_div(self, rhs: &u8) -> <Decimal as CheckedDiv<&u8>>::Output
fn checked_div(self, rhs: &u8) -> <Decimal as CheckedDiv<&u8>>::Output
Some(self / rhs)
or None
if the result can not be
represented by the Output
type.source§impl<'a> CheckedDiv<Decimal> for &'a Decimalwhere
Decimal: CheckedDiv<Decimal>,
impl<'a> CheckedDiv<Decimal> for &'a Decimalwhere Decimal: CheckedDiv<Decimal>,
§type Output = <Decimal as CheckedDiv<Decimal>>::Output
type Output = <Decimal as CheckedDiv<Decimal>>::Output
checked_div
.source§fn checked_div(
self,
rhs: Decimal
) -> <&'a Decimal as CheckedDiv<Decimal>>::Output
fn checked_div( self, rhs: Decimal ) -> <&'a Decimal as CheckedDiv<Decimal>>::Output
Some(self / rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedDiv<Decimal> for Decimal
impl CheckedDiv<Decimal> for Decimal
source§impl<'a> CheckedDiv<i128> for &'a Decimalwhere
Decimal: CheckedDiv<i128>,
impl<'a> CheckedDiv<i128> for &'a Decimalwhere Decimal: CheckedDiv<i128>,
source§fn checked_div(self, rhs: i128) -> <&'a Decimal as CheckedDiv<i128>>::Output
fn checked_div(self, rhs: i128) -> <&'a Decimal as CheckedDiv<i128>>::Output
Some(self / rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedDiv<i128> for Decimal
impl CheckedDiv<i128> for Decimal
source§impl<'a> CheckedDiv<i16> for &'a Decimalwhere
Decimal: CheckedDiv<i16>,
impl<'a> CheckedDiv<i16> for &'a Decimalwhere Decimal: CheckedDiv<i16>,
source§fn checked_div(self, rhs: i16) -> <&'a Decimal as CheckedDiv<i16>>::Output
fn checked_div(self, rhs: i16) -> <&'a Decimal as CheckedDiv<i16>>::Output
Some(self / rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedDiv<i16> for Decimal
impl CheckedDiv<i16> for Decimal
source§impl<'a> CheckedDiv<i32> for &'a Decimalwhere
Decimal: CheckedDiv<i32>,
impl<'a> CheckedDiv<i32> for &'a Decimalwhere Decimal: CheckedDiv<i32>,
source§fn checked_div(self, rhs: i32) -> <&'a Decimal as CheckedDiv<i32>>::Output
fn checked_div(self, rhs: i32) -> <&'a Decimal as CheckedDiv<i32>>::Output
Some(self / rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedDiv<i32> for Decimal
impl CheckedDiv<i32> for Decimal
source§impl<'a> CheckedDiv<i64> for &'a Decimalwhere
Decimal: CheckedDiv<i64>,
impl<'a> CheckedDiv<i64> for &'a Decimalwhere Decimal: CheckedDiv<i64>,
source§fn checked_div(self, rhs: i64) -> <&'a Decimal as CheckedDiv<i64>>::Output
fn checked_div(self, rhs: i64) -> <&'a Decimal as CheckedDiv<i64>>::Output
Some(self / rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedDiv<i64> for Decimal
impl CheckedDiv<i64> for Decimal
source§impl<'a> CheckedDiv<i8> for &'a Decimalwhere
Decimal: CheckedDiv<i8>,
impl<'a> CheckedDiv<i8> for &'a Decimalwhere Decimal: CheckedDiv<i8>,
source§fn checked_div(self, rhs: i8) -> <&'a Decimal as CheckedDiv<i8>>::Output
fn checked_div(self, rhs: i8) -> <&'a Decimal as CheckedDiv<i8>>::Output
Some(self / rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedDiv<i8> for Decimal
impl CheckedDiv<i8> for Decimal
source§impl<'a> CheckedDiv<u16> for &'a Decimalwhere
Decimal: CheckedDiv<u16>,
impl<'a> CheckedDiv<u16> for &'a Decimalwhere Decimal: CheckedDiv<u16>,
source§fn checked_div(self, rhs: u16) -> <&'a Decimal as CheckedDiv<u16>>::Output
fn checked_div(self, rhs: u16) -> <&'a Decimal as CheckedDiv<u16>>::Output
Some(self / rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedDiv<u16> for Decimal
impl CheckedDiv<u16> for Decimal
source§impl<'a> CheckedDiv<u32> for &'a Decimalwhere
Decimal: CheckedDiv<u32>,
impl<'a> CheckedDiv<u32> for &'a Decimalwhere Decimal: CheckedDiv<u32>,
source§fn checked_div(self, rhs: u32) -> <&'a Decimal as CheckedDiv<u32>>::Output
fn checked_div(self, rhs: u32) -> <&'a Decimal as CheckedDiv<u32>>::Output
Some(self / rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedDiv<u32> for Decimal
impl CheckedDiv<u32> for Decimal
source§impl<'a> CheckedDiv<u64> for &'a Decimalwhere
Decimal: CheckedDiv<u64>,
impl<'a> CheckedDiv<u64> for &'a Decimalwhere Decimal: CheckedDiv<u64>,
source§fn checked_div(self, rhs: u64) -> <&'a Decimal as CheckedDiv<u64>>::Output
fn checked_div(self, rhs: u64) -> <&'a Decimal as CheckedDiv<u64>>::Output
Some(self / rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedDiv<u64> for Decimal
impl CheckedDiv<u64> for Decimal
source§impl<'a> CheckedDiv<u8> for &'a Decimalwhere
Decimal: CheckedDiv<u8>,
impl<'a> CheckedDiv<u8> for &'a Decimalwhere Decimal: CheckedDiv<u8>,
source§fn checked_div(self, rhs: u8) -> <&'a Decimal as CheckedDiv<u8>>::Output
fn checked_div(self, rhs: u8) -> <&'a Decimal as CheckedDiv<u8>>::Output
Some(self / rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedDiv<u8> for Decimal
impl CheckedDiv<u8> for Decimal
source§impl CheckedMul<&Decimal> for &Decimalwhere
Decimal: CheckedMul<Decimal>,
impl CheckedMul<&Decimal> for &Decimalwhere Decimal: CheckedMul<Decimal>,
§type Output = <Decimal as CheckedMul<Decimal>>::Output
type Output = <Decimal as CheckedMul<Decimal>>::Output
checked_mul
.source§fn checked_mul(self, rhs: &Decimal) -> <&Decimal as CheckedMul<&Decimal>>::Output
fn checked_mul(self, rhs: &Decimal) -> <&Decimal as CheckedMul<&Decimal>>::Output
Some(self * rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedMul<&Decimal> for Decimalwhere
Decimal: CheckedMul<Decimal>,
impl CheckedMul<&Decimal> for Decimalwhere Decimal: CheckedMul<Decimal>,
§type Output = <Decimal as CheckedMul<Decimal>>::Output
type Output = <Decimal as CheckedMul<Decimal>>::Output
checked_mul
.source§fn checked_mul(self, rhs: &Decimal) -> <Decimal as CheckedMul<&Decimal>>::Output
fn checked_mul(self, rhs: &Decimal) -> <Decimal as CheckedMul<&Decimal>>::Output
Some(self * rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedMul<&i128> for &Decimalwhere
Decimal: CheckedMul<i128>,
impl CheckedMul<&i128> for &Decimalwhere Decimal: CheckedMul<i128>,
source§fn checked_mul(self, rhs: &i128) -> <&Decimal as CheckedMul<&i128>>::Output
fn checked_mul(self, rhs: &i128) -> <&Decimal as CheckedMul<&i128>>::Output
Some(self * rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedMul<&i128> for Decimalwhere
Decimal: CheckedMul<i128>,
impl CheckedMul<&i128> for Decimalwhere Decimal: CheckedMul<i128>,
source§fn checked_mul(self, rhs: &i128) -> <Decimal as CheckedMul<&i128>>::Output
fn checked_mul(self, rhs: &i128) -> <Decimal as CheckedMul<&i128>>::Output
Some(self * rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedMul<&i16> for &Decimalwhere
Decimal: CheckedMul<i16>,
impl CheckedMul<&i16> for &Decimalwhere Decimal: CheckedMul<i16>,
source§fn checked_mul(self, rhs: &i16) -> <&Decimal as CheckedMul<&i16>>::Output
fn checked_mul(self, rhs: &i16) -> <&Decimal as CheckedMul<&i16>>::Output
Some(self * rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedMul<&i16> for Decimalwhere
Decimal: CheckedMul<i16>,
impl CheckedMul<&i16> for Decimalwhere Decimal: CheckedMul<i16>,
source§fn checked_mul(self, rhs: &i16) -> <Decimal as CheckedMul<&i16>>::Output
fn checked_mul(self, rhs: &i16) -> <Decimal as CheckedMul<&i16>>::Output
Some(self * rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedMul<&i32> for &Decimalwhere
Decimal: CheckedMul<i32>,
impl CheckedMul<&i32> for &Decimalwhere Decimal: CheckedMul<i32>,
source§fn checked_mul(self, rhs: &i32) -> <&Decimal as CheckedMul<&i32>>::Output
fn checked_mul(self, rhs: &i32) -> <&Decimal as CheckedMul<&i32>>::Output
Some(self * rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedMul<&i32> for Decimalwhere
Decimal: CheckedMul<i32>,
impl CheckedMul<&i32> for Decimalwhere Decimal: CheckedMul<i32>,
source§fn checked_mul(self, rhs: &i32) -> <Decimal as CheckedMul<&i32>>::Output
fn checked_mul(self, rhs: &i32) -> <Decimal as CheckedMul<&i32>>::Output
Some(self * rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedMul<&i64> for &Decimalwhere
Decimal: CheckedMul<i64>,
impl CheckedMul<&i64> for &Decimalwhere Decimal: CheckedMul<i64>,
source§fn checked_mul(self, rhs: &i64) -> <&Decimal as CheckedMul<&i64>>::Output
fn checked_mul(self, rhs: &i64) -> <&Decimal as CheckedMul<&i64>>::Output
Some(self * rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedMul<&i64> for Decimalwhere
Decimal: CheckedMul<i64>,
impl CheckedMul<&i64> for Decimalwhere Decimal: CheckedMul<i64>,
source§fn checked_mul(self, rhs: &i64) -> <Decimal as CheckedMul<&i64>>::Output
fn checked_mul(self, rhs: &i64) -> <Decimal as CheckedMul<&i64>>::Output
Some(self * rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedMul<&i8> for &Decimalwhere
Decimal: CheckedMul<i8>,
impl CheckedMul<&i8> for &Decimalwhere Decimal: CheckedMul<i8>,
source§fn checked_mul(self, rhs: &i8) -> <&Decimal as CheckedMul<&i8>>::Output
fn checked_mul(self, rhs: &i8) -> <&Decimal as CheckedMul<&i8>>::Output
Some(self * rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedMul<&i8> for Decimalwhere
Decimal: CheckedMul<i8>,
impl CheckedMul<&i8> for Decimalwhere Decimal: CheckedMul<i8>,
source§fn checked_mul(self, rhs: &i8) -> <Decimal as CheckedMul<&i8>>::Output
fn checked_mul(self, rhs: &i8) -> <Decimal as CheckedMul<&i8>>::Output
Some(self * rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedMul<&u16> for &Decimalwhere
Decimal: CheckedMul<u16>,
impl CheckedMul<&u16> for &Decimalwhere Decimal: CheckedMul<u16>,
source§fn checked_mul(self, rhs: &u16) -> <&Decimal as CheckedMul<&u16>>::Output
fn checked_mul(self, rhs: &u16) -> <&Decimal as CheckedMul<&u16>>::Output
Some(self * rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedMul<&u16> for Decimalwhere
Decimal: CheckedMul<u16>,
impl CheckedMul<&u16> for Decimalwhere Decimal: CheckedMul<u16>,
source§fn checked_mul(self, rhs: &u16) -> <Decimal as CheckedMul<&u16>>::Output
fn checked_mul(self, rhs: &u16) -> <Decimal as CheckedMul<&u16>>::Output
Some(self * rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedMul<&u32> for &Decimalwhere
Decimal: CheckedMul<u32>,
impl CheckedMul<&u32> for &Decimalwhere Decimal: CheckedMul<u32>,
source§fn checked_mul(self, rhs: &u32) -> <&Decimal as CheckedMul<&u32>>::Output
fn checked_mul(self, rhs: &u32) -> <&Decimal as CheckedMul<&u32>>::Output
Some(self * rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedMul<&u32> for Decimalwhere
Decimal: CheckedMul<u32>,
impl CheckedMul<&u32> for Decimalwhere Decimal: CheckedMul<u32>,
source§fn checked_mul(self, rhs: &u32) -> <Decimal as CheckedMul<&u32>>::Output
fn checked_mul(self, rhs: &u32) -> <Decimal as CheckedMul<&u32>>::Output
Some(self * rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedMul<&u64> for &Decimalwhere
Decimal: CheckedMul<u64>,
impl CheckedMul<&u64> for &Decimalwhere Decimal: CheckedMul<u64>,
source§fn checked_mul(self, rhs: &u64) -> <&Decimal as CheckedMul<&u64>>::Output
fn checked_mul(self, rhs: &u64) -> <&Decimal as CheckedMul<&u64>>::Output
Some(self * rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedMul<&u64> for Decimalwhere
Decimal: CheckedMul<u64>,
impl CheckedMul<&u64> for Decimalwhere Decimal: CheckedMul<u64>,
source§fn checked_mul(self, rhs: &u64) -> <Decimal as CheckedMul<&u64>>::Output
fn checked_mul(self, rhs: &u64) -> <Decimal as CheckedMul<&u64>>::Output
Some(self * rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedMul<&u8> for &Decimalwhere
Decimal: CheckedMul<u8>,
impl CheckedMul<&u8> for &Decimalwhere Decimal: CheckedMul<u8>,
source§fn checked_mul(self, rhs: &u8) -> <&Decimal as CheckedMul<&u8>>::Output
fn checked_mul(self, rhs: &u8) -> <&Decimal as CheckedMul<&u8>>::Output
Some(self * rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedMul<&u8> for Decimalwhere
Decimal: CheckedMul<u8>,
impl CheckedMul<&u8> for Decimalwhere Decimal: CheckedMul<u8>,
source§fn checked_mul(self, rhs: &u8) -> <Decimal as CheckedMul<&u8>>::Output
fn checked_mul(self, rhs: &u8) -> <Decimal as CheckedMul<&u8>>::Output
Some(self * rhs)
or None
if the result can not be
represented by the Output
type.source§impl<'a> CheckedMul<Decimal> for &'a Decimalwhere
Decimal: CheckedMul<Decimal>,
impl<'a> CheckedMul<Decimal> for &'a Decimalwhere Decimal: CheckedMul<Decimal>,
§type Output = <Decimal as CheckedMul<Decimal>>::Output
type Output = <Decimal as CheckedMul<Decimal>>::Output
checked_mul
.source§fn checked_mul(
self,
rhs: Decimal
) -> <&'a Decimal as CheckedMul<Decimal>>::Output
fn checked_mul( self, rhs: Decimal ) -> <&'a Decimal as CheckedMul<Decimal>>::Output
Some(self * rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedMul<Decimal> for Decimal
impl CheckedMul<Decimal> for Decimal
source§impl<'a> CheckedMul<i128> for &'a Decimalwhere
Decimal: CheckedMul<i128>,
impl<'a> CheckedMul<i128> for &'a Decimalwhere Decimal: CheckedMul<i128>,
source§fn checked_mul(self, rhs: i128) -> <&'a Decimal as CheckedMul<i128>>::Output
fn checked_mul(self, rhs: i128) -> <&'a Decimal as CheckedMul<i128>>::Output
Some(self * rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedMul<i128> for Decimal
impl CheckedMul<i128> for Decimal
source§impl<'a> CheckedMul<i16> for &'a Decimalwhere
Decimal: CheckedMul<i16>,
impl<'a> CheckedMul<i16> for &'a Decimalwhere Decimal: CheckedMul<i16>,
source§fn checked_mul(self, rhs: i16) -> <&'a Decimal as CheckedMul<i16>>::Output
fn checked_mul(self, rhs: i16) -> <&'a Decimal as CheckedMul<i16>>::Output
Some(self * rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedMul<i16> for Decimal
impl CheckedMul<i16> for Decimal
source§impl<'a> CheckedMul<i32> for &'a Decimalwhere
Decimal: CheckedMul<i32>,
impl<'a> CheckedMul<i32> for &'a Decimalwhere Decimal: CheckedMul<i32>,
source§fn checked_mul(self, rhs: i32) -> <&'a Decimal as CheckedMul<i32>>::Output
fn checked_mul(self, rhs: i32) -> <&'a Decimal as CheckedMul<i32>>::Output
Some(self * rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedMul<i32> for Decimal
impl CheckedMul<i32> for Decimal
source§impl<'a> CheckedMul<i64> for &'a Decimalwhere
Decimal: CheckedMul<i64>,
impl<'a> CheckedMul<i64> for &'a Decimalwhere Decimal: CheckedMul<i64>,
source§fn checked_mul(self, rhs: i64) -> <&'a Decimal as CheckedMul<i64>>::Output
fn checked_mul(self, rhs: i64) -> <&'a Decimal as CheckedMul<i64>>::Output
Some(self * rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedMul<i64> for Decimal
impl CheckedMul<i64> for Decimal
source§impl<'a> CheckedMul<i8> for &'a Decimalwhere
Decimal: CheckedMul<i8>,
impl<'a> CheckedMul<i8> for &'a Decimalwhere Decimal: CheckedMul<i8>,
source§fn checked_mul(self, rhs: i8) -> <&'a Decimal as CheckedMul<i8>>::Output
fn checked_mul(self, rhs: i8) -> <&'a Decimal as CheckedMul<i8>>::Output
Some(self * rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedMul<i8> for Decimal
impl CheckedMul<i8> for Decimal
source§impl<'a> CheckedMul<u16> for &'a Decimalwhere
Decimal: CheckedMul<u16>,
impl<'a> CheckedMul<u16> for &'a Decimalwhere Decimal: CheckedMul<u16>,
source§fn checked_mul(self, rhs: u16) -> <&'a Decimal as CheckedMul<u16>>::Output
fn checked_mul(self, rhs: u16) -> <&'a Decimal as CheckedMul<u16>>::Output
Some(self * rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedMul<u16> for Decimal
impl CheckedMul<u16> for Decimal
source§impl<'a> CheckedMul<u32> for &'a Decimalwhere
Decimal: CheckedMul<u32>,
impl<'a> CheckedMul<u32> for &'a Decimalwhere Decimal: CheckedMul<u32>,
source§fn checked_mul(self, rhs: u32) -> <&'a Decimal as CheckedMul<u32>>::Output
fn checked_mul(self, rhs: u32) -> <&'a Decimal as CheckedMul<u32>>::Output
Some(self * rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedMul<u32> for Decimal
impl CheckedMul<u32> for Decimal
source§impl<'a> CheckedMul<u64> for &'a Decimalwhere
Decimal: CheckedMul<u64>,
impl<'a> CheckedMul<u64> for &'a Decimalwhere Decimal: CheckedMul<u64>,
source§fn checked_mul(self, rhs: u64) -> <&'a Decimal as CheckedMul<u64>>::Output
fn checked_mul(self, rhs: u64) -> <&'a Decimal as CheckedMul<u64>>::Output
Some(self * rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedMul<u64> for Decimal
impl CheckedMul<u64> for Decimal
source§impl<'a> CheckedMul<u8> for &'a Decimalwhere
Decimal: CheckedMul<u8>,
impl<'a> CheckedMul<u8> for &'a Decimalwhere Decimal: CheckedMul<u8>,
source§fn checked_mul(self, rhs: u8) -> <&'a Decimal as CheckedMul<u8>>::Output
fn checked_mul(self, rhs: u8) -> <&'a Decimal as CheckedMul<u8>>::Output
Some(self * rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedMul<u8> for Decimal
impl CheckedMul<u8> for Decimal
source§impl CheckedRem<&Decimal> for &Decimalwhere
Decimal: CheckedRem<Decimal>,
impl CheckedRem<&Decimal> for &Decimalwhere Decimal: CheckedRem<Decimal>,
§type Output = <Decimal as CheckedRem<Decimal>>::Output
type Output = <Decimal as CheckedRem<Decimal>>::Output
checked_rem
.source§fn checked_rem(self, rhs: &Decimal) -> <&Decimal as CheckedRem<&Decimal>>::Output
fn checked_rem(self, rhs: &Decimal) -> <&Decimal as CheckedRem<&Decimal>>::Output
Some(self % rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedRem<&Decimal> for Decimalwhere
Decimal: CheckedRem<Decimal>,
impl CheckedRem<&Decimal> for Decimalwhere Decimal: CheckedRem<Decimal>,
§type Output = <Decimal as CheckedRem<Decimal>>::Output
type Output = <Decimal as CheckedRem<Decimal>>::Output
checked_rem
.source§fn checked_rem(self, rhs: &Decimal) -> <Decimal as CheckedRem<&Decimal>>::Output
fn checked_rem(self, rhs: &Decimal) -> <Decimal as CheckedRem<&Decimal>>::Output
Some(self % rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedRem<&i128> for &Decimalwhere
Decimal: CheckedRem<i128>,
impl CheckedRem<&i128> for &Decimalwhere Decimal: CheckedRem<i128>,
source§fn checked_rem(self, rhs: &i128) -> <&Decimal as CheckedRem<&i128>>::Output
fn checked_rem(self, rhs: &i128) -> <&Decimal as CheckedRem<&i128>>::Output
Some(self % rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedRem<&i128> for Decimalwhere
Decimal: CheckedRem<i128>,
impl CheckedRem<&i128> for Decimalwhere Decimal: CheckedRem<i128>,
source§fn checked_rem(self, rhs: &i128) -> <Decimal as CheckedRem<&i128>>::Output
fn checked_rem(self, rhs: &i128) -> <Decimal as CheckedRem<&i128>>::Output
Some(self % rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedRem<&i16> for &Decimalwhere
Decimal: CheckedRem<i16>,
impl CheckedRem<&i16> for &Decimalwhere Decimal: CheckedRem<i16>,
source§fn checked_rem(self, rhs: &i16) -> <&Decimal as CheckedRem<&i16>>::Output
fn checked_rem(self, rhs: &i16) -> <&Decimal as CheckedRem<&i16>>::Output
Some(self % rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedRem<&i16> for Decimalwhere
Decimal: CheckedRem<i16>,
impl CheckedRem<&i16> for Decimalwhere Decimal: CheckedRem<i16>,
source§fn checked_rem(self, rhs: &i16) -> <Decimal as CheckedRem<&i16>>::Output
fn checked_rem(self, rhs: &i16) -> <Decimal as CheckedRem<&i16>>::Output
Some(self % rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedRem<&i32> for &Decimalwhere
Decimal: CheckedRem<i32>,
impl CheckedRem<&i32> for &Decimalwhere Decimal: CheckedRem<i32>,
source§fn checked_rem(self, rhs: &i32) -> <&Decimal as CheckedRem<&i32>>::Output
fn checked_rem(self, rhs: &i32) -> <&Decimal as CheckedRem<&i32>>::Output
Some(self % rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedRem<&i32> for Decimalwhere
Decimal: CheckedRem<i32>,
impl CheckedRem<&i32> for Decimalwhere Decimal: CheckedRem<i32>,
source§fn checked_rem(self, rhs: &i32) -> <Decimal as CheckedRem<&i32>>::Output
fn checked_rem(self, rhs: &i32) -> <Decimal as CheckedRem<&i32>>::Output
Some(self % rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedRem<&i64> for &Decimalwhere
Decimal: CheckedRem<i64>,
impl CheckedRem<&i64> for &Decimalwhere Decimal: CheckedRem<i64>,
source§fn checked_rem(self, rhs: &i64) -> <&Decimal as CheckedRem<&i64>>::Output
fn checked_rem(self, rhs: &i64) -> <&Decimal as CheckedRem<&i64>>::Output
Some(self % rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedRem<&i64> for Decimalwhere
Decimal: CheckedRem<i64>,
impl CheckedRem<&i64> for Decimalwhere Decimal: CheckedRem<i64>,
source§fn checked_rem(self, rhs: &i64) -> <Decimal as CheckedRem<&i64>>::Output
fn checked_rem(self, rhs: &i64) -> <Decimal as CheckedRem<&i64>>::Output
Some(self % rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedRem<&i8> for &Decimalwhere
Decimal: CheckedRem<i8>,
impl CheckedRem<&i8> for &Decimalwhere Decimal: CheckedRem<i8>,
source§fn checked_rem(self, rhs: &i8) -> <&Decimal as CheckedRem<&i8>>::Output
fn checked_rem(self, rhs: &i8) -> <&Decimal as CheckedRem<&i8>>::Output
Some(self % rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedRem<&i8> for Decimalwhere
Decimal: CheckedRem<i8>,
impl CheckedRem<&i8> for Decimalwhere Decimal: CheckedRem<i8>,
source§fn checked_rem(self, rhs: &i8) -> <Decimal as CheckedRem<&i8>>::Output
fn checked_rem(self, rhs: &i8) -> <Decimal as CheckedRem<&i8>>::Output
Some(self % rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedRem<&u16> for &Decimalwhere
Decimal: CheckedRem<u16>,
impl CheckedRem<&u16> for &Decimalwhere Decimal: CheckedRem<u16>,
source§fn checked_rem(self, rhs: &u16) -> <&Decimal as CheckedRem<&u16>>::Output
fn checked_rem(self, rhs: &u16) -> <&Decimal as CheckedRem<&u16>>::Output
Some(self % rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedRem<&u16> for Decimalwhere
Decimal: CheckedRem<u16>,
impl CheckedRem<&u16> for Decimalwhere Decimal: CheckedRem<u16>,
source§fn checked_rem(self, rhs: &u16) -> <Decimal as CheckedRem<&u16>>::Output
fn checked_rem(self, rhs: &u16) -> <Decimal as CheckedRem<&u16>>::Output
Some(self % rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedRem<&u32> for &Decimalwhere
Decimal: CheckedRem<u32>,
impl CheckedRem<&u32> for &Decimalwhere Decimal: CheckedRem<u32>,
source§fn checked_rem(self, rhs: &u32) -> <&Decimal as CheckedRem<&u32>>::Output
fn checked_rem(self, rhs: &u32) -> <&Decimal as CheckedRem<&u32>>::Output
Some(self % rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedRem<&u32> for Decimalwhere
Decimal: CheckedRem<u32>,
impl CheckedRem<&u32> for Decimalwhere Decimal: CheckedRem<u32>,
source§fn checked_rem(self, rhs: &u32) -> <Decimal as CheckedRem<&u32>>::Output
fn checked_rem(self, rhs: &u32) -> <Decimal as CheckedRem<&u32>>::Output
Some(self % rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedRem<&u64> for &Decimalwhere
Decimal: CheckedRem<u64>,
impl CheckedRem<&u64> for &Decimalwhere Decimal: CheckedRem<u64>,
source§fn checked_rem(self, rhs: &u64) -> <&Decimal as CheckedRem<&u64>>::Output
fn checked_rem(self, rhs: &u64) -> <&Decimal as CheckedRem<&u64>>::Output
Some(self % rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedRem<&u64> for Decimalwhere
Decimal: CheckedRem<u64>,
impl CheckedRem<&u64> for Decimalwhere Decimal: CheckedRem<u64>,
source§fn checked_rem(self, rhs: &u64) -> <Decimal as CheckedRem<&u64>>::Output
fn checked_rem(self, rhs: &u64) -> <Decimal as CheckedRem<&u64>>::Output
Some(self % rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedRem<&u8> for &Decimalwhere
Decimal: CheckedRem<u8>,
impl CheckedRem<&u8> for &Decimalwhere Decimal: CheckedRem<u8>,
source§fn checked_rem(self, rhs: &u8) -> <&Decimal as CheckedRem<&u8>>::Output
fn checked_rem(self, rhs: &u8) -> <&Decimal as CheckedRem<&u8>>::Output
Some(self % rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedRem<&u8> for Decimalwhere
Decimal: CheckedRem<u8>,
impl CheckedRem<&u8> for Decimalwhere Decimal: CheckedRem<u8>,
source§fn checked_rem(self, rhs: &u8) -> <Decimal as CheckedRem<&u8>>::Output
fn checked_rem(self, rhs: &u8) -> <Decimal as CheckedRem<&u8>>::Output
Some(self % rhs)
or None
if the result can not be
represented by the Output
type.source§impl<'a> CheckedRem<Decimal> for &'a Decimalwhere
Decimal: CheckedRem<Decimal>,
impl<'a> CheckedRem<Decimal> for &'a Decimalwhere Decimal: CheckedRem<Decimal>,
§type Output = <Decimal as CheckedRem<Decimal>>::Output
type Output = <Decimal as CheckedRem<Decimal>>::Output
checked_rem
.source§fn checked_rem(
self,
rhs: Decimal
) -> <&'a Decimal as CheckedRem<Decimal>>::Output
fn checked_rem( self, rhs: Decimal ) -> <&'a Decimal as CheckedRem<Decimal>>::Output
Some(self % rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedRem<Decimal> for Decimal
impl CheckedRem<Decimal> for Decimal
source§impl<'a> CheckedRem<i128> for &'a Decimalwhere
Decimal: CheckedRem<i128>,
impl<'a> CheckedRem<i128> for &'a Decimalwhere Decimal: CheckedRem<i128>,
source§fn checked_rem(self, rhs: i128) -> <&'a Decimal as CheckedRem<i128>>::Output
fn checked_rem(self, rhs: i128) -> <&'a Decimal as CheckedRem<i128>>::Output
Some(self % rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedRem<i128> for Decimal
impl CheckedRem<i128> for Decimal
source§impl<'a> CheckedRem<i16> for &'a Decimalwhere
Decimal: CheckedRem<i16>,
impl<'a> CheckedRem<i16> for &'a Decimalwhere Decimal: CheckedRem<i16>,
source§fn checked_rem(self, rhs: i16) -> <&'a Decimal as CheckedRem<i16>>::Output
fn checked_rem(self, rhs: i16) -> <&'a Decimal as CheckedRem<i16>>::Output
Some(self % rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedRem<i16> for Decimal
impl CheckedRem<i16> for Decimal
source§impl<'a> CheckedRem<i32> for &'a Decimalwhere
Decimal: CheckedRem<i32>,
impl<'a> CheckedRem<i32> for &'a Decimalwhere Decimal: CheckedRem<i32>,
source§fn checked_rem(self, rhs: i32) -> <&'a Decimal as CheckedRem<i32>>::Output
fn checked_rem(self, rhs: i32) -> <&'a Decimal as CheckedRem<i32>>::Output
Some(self % rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedRem<i32> for Decimal
impl CheckedRem<i32> for Decimal
source§impl<'a> CheckedRem<i64> for &'a Decimalwhere
Decimal: CheckedRem<i64>,
impl<'a> CheckedRem<i64> for &'a Decimalwhere Decimal: CheckedRem<i64>,
source§fn checked_rem(self, rhs: i64) -> <&'a Decimal as CheckedRem<i64>>::Output
fn checked_rem(self, rhs: i64) -> <&'a Decimal as CheckedRem<i64>>::Output
Some(self % rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedRem<i64> for Decimal
impl CheckedRem<i64> for Decimal
source§impl<'a> CheckedRem<i8> for &'a Decimalwhere
Decimal: CheckedRem<i8>,
impl<'a> CheckedRem<i8> for &'a Decimalwhere Decimal: CheckedRem<i8>,
source§fn checked_rem(self, rhs: i8) -> <&'a Decimal as CheckedRem<i8>>::Output
fn checked_rem(self, rhs: i8) -> <&'a Decimal as CheckedRem<i8>>::Output
Some(self % rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedRem<i8> for Decimal
impl CheckedRem<i8> for Decimal
source§impl<'a> CheckedRem<u16> for &'a Decimalwhere
Decimal: CheckedRem<u16>,
impl<'a> CheckedRem<u16> for &'a Decimalwhere Decimal: CheckedRem<u16>,
source§fn checked_rem(self, rhs: u16) -> <&'a Decimal as CheckedRem<u16>>::Output
fn checked_rem(self, rhs: u16) -> <&'a Decimal as CheckedRem<u16>>::Output
Some(self % rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedRem<u16> for Decimal
impl CheckedRem<u16> for Decimal
source§impl<'a> CheckedRem<u32> for &'a Decimalwhere
Decimal: CheckedRem<u32>,
impl<'a> CheckedRem<u32> for &'a Decimalwhere Decimal: CheckedRem<u32>,
source§fn checked_rem(self, rhs: u32) -> <&'a Decimal as CheckedRem<u32>>::Output
fn checked_rem(self, rhs: u32) -> <&'a Decimal as CheckedRem<u32>>::Output
Some(self % rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedRem<u32> for Decimal
impl CheckedRem<u32> for Decimal
source§impl<'a> CheckedRem<u64> for &'a Decimalwhere
Decimal: CheckedRem<u64>,
impl<'a> CheckedRem<u64> for &'a Decimalwhere Decimal: CheckedRem<u64>,
source§fn checked_rem(self, rhs: u64) -> <&'a Decimal as CheckedRem<u64>>::Output
fn checked_rem(self, rhs: u64) -> <&'a Decimal as CheckedRem<u64>>::Output
Some(self % rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedRem<u64> for Decimal
impl CheckedRem<u64> for Decimal
source§impl<'a> CheckedRem<u8> for &'a Decimalwhere
Decimal: CheckedRem<u8>,
impl<'a> CheckedRem<u8> for &'a Decimalwhere Decimal: CheckedRem<u8>,
source§fn checked_rem(self, rhs: u8) -> <&'a Decimal as CheckedRem<u8>>::Output
fn checked_rem(self, rhs: u8) -> <&'a Decimal as CheckedRem<u8>>::Output
Some(self % rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedRem<u8> for Decimal
impl CheckedRem<u8> for Decimal
source§impl CheckedSub<&Decimal> for &Decimalwhere
Decimal: CheckedSub<Decimal>,
impl CheckedSub<&Decimal> for &Decimalwhere Decimal: CheckedSub<Decimal>,
§type Output = <Decimal as CheckedSub<Decimal>>::Output
type Output = <Decimal as CheckedSub<Decimal>>::Output
checked_sub
.source§fn checked_sub(self, rhs: &Decimal) -> <&Decimal as CheckedSub<&Decimal>>::Output
fn checked_sub(self, rhs: &Decimal) -> <&Decimal as CheckedSub<&Decimal>>::Output
Some(self - rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedSub<&Decimal> for Decimalwhere
Decimal: CheckedSub<Decimal>,
impl CheckedSub<&Decimal> for Decimalwhere Decimal: CheckedSub<Decimal>,
§type Output = <Decimal as CheckedSub<Decimal>>::Output
type Output = <Decimal as CheckedSub<Decimal>>::Output
checked_sub
.source§fn checked_sub(self, rhs: &Decimal) -> <Decimal as CheckedSub<&Decimal>>::Output
fn checked_sub(self, rhs: &Decimal) -> <Decimal as CheckedSub<&Decimal>>::Output
Some(self - rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedSub<&i128> for &Decimalwhere
Decimal: CheckedSub<i128>,
impl CheckedSub<&i128> for &Decimalwhere Decimal: CheckedSub<i128>,
source§fn checked_sub(self, rhs: &i128) -> <&Decimal as CheckedSub<&i128>>::Output
fn checked_sub(self, rhs: &i128) -> <&Decimal as CheckedSub<&i128>>::Output
Some(self - rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedSub<&i128> for Decimalwhere
Decimal: CheckedSub<i128>,
impl CheckedSub<&i128> for Decimalwhere Decimal: CheckedSub<i128>,
source§fn checked_sub(self, rhs: &i128) -> <Decimal as CheckedSub<&i128>>::Output
fn checked_sub(self, rhs: &i128) -> <Decimal as CheckedSub<&i128>>::Output
Some(self - rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedSub<&i16> for &Decimalwhere
Decimal: CheckedSub<i16>,
impl CheckedSub<&i16> for &Decimalwhere Decimal: CheckedSub<i16>,
source§fn checked_sub(self, rhs: &i16) -> <&Decimal as CheckedSub<&i16>>::Output
fn checked_sub(self, rhs: &i16) -> <&Decimal as CheckedSub<&i16>>::Output
Some(self - rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedSub<&i16> for Decimalwhere
Decimal: CheckedSub<i16>,
impl CheckedSub<&i16> for Decimalwhere Decimal: CheckedSub<i16>,
source§fn checked_sub(self, rhs: &i16) -> <Decimal as CheckedSub<&i16>>::Output
fn checked_sub(self, rhs: &i16) -> <Decimal as CheckedSub<&i16>>::Output
Some(self - rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedSub<&i32> for &Decimalwhere
Decimal: CheckedSub<i32>,
impl CheckedSub<&i32> for &Decimalwhere Decimal: CheckedSub<i32>,
source§fn checked_sub(self, rhs: &i32) -> <&Decimal as CheckedSub<&i32>>::Output
fn checked_sub(self, rhs: &i32) -> <&Decimal as CheckedSub<&i32>>::Output
Some(self - rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedSub<&i32> for Decimalwhere
Decimal: CheckedSub<i32>,
impl CheckedSub<&i32> for Decimalwhere Decimal: CheckedSub<i32>,
source§fn checked_sub(self, rhs: &i32) -> <Decimal as CheckedSub<&i32>>::Output
fn checked_sub(self, rhs: &i32) -> <Decimal as CheckedSub<&i32>>::Output
Some(self - rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedSub<&i64> for &Decimalwhere
Decimal: CheckedSub<i64>,
impl CheckedSub<&i64> for &Decimalwhere Decimal: CheckedSub<i64>,
source§fn checked_sub(self, rhs: &i64) -> <&Decimal as CheckedSub<&i64>>::Output
fn checked_sub(self, rhs: &i64) -> <&Decimal as CheckedSub<&i64>>::Output
Some(self - rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedSub<&i64> for Decimalwhere
Decimal: CheckedSub<i64>,
impl CheckedSub<&i64> for Decimalwhere Decimal: CheckedSub<i64>,
source§fn checked_sub(self, rhs: &i64) -> <Decimal as CheckedSub<&i64>>::Output
fn checked_sub(self, rhs: &i64) -> <Decimal as CheckedSub<&i64>>::Output
Some(self - rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedSub<&i8> for &Decimalwhere
Decimal: CheckedSub<i8>,
impl CheckedSub<&i8> for &Decimalwhere Decimal: CheckedSub<i8>,
source§fn checked_sub(self, rhs: &i8) -> <&Decimal as CheckedSub<&i8>>::Output
fn checked_sub(self, rhs: &i8) -> <&Decimal as CheckedSub<&i8>>::Output
Some(self - rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedSub<&i8> for Decimalwhere
Decimal: CheckedSub<i8>,
impl CheckedSub<&i8> for Decimalwhere Decimal: CheckedSub<i8>,
source§fn checked_sub(self, rhs: &i8) -> <Decimal as CheckedSub<&i8>>::Output
fn checked_sub(self, rhs: &i8) -> <Decimal as CheckedSub<&i8>>::Output
Some(self - rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedSub<&u16> for &Decimalwhere
Decimal: CheckedSub<u16>,
impl CheckedSub<&u16> for &Decimalwhere Decimal: CheckedSub<u16>,
source§fn checked_sub(self, rhs: &u16) -> <&Decimal as CheckedSub<&u16>>::Output
fn checked_sub(self, rhs: &u16) -> <&Decimal as CheckedSub<&u16>>::Output
Some(self - rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedSub<&u16> for Decimalwhere
Decimal: CheckedSub<u16>,
impl CheckedSub<&u16> for Decimalwhere Decimal: CheckedSub<u16>,
source§fn checked_sub(self, rhs: &u16) -> <Decimal as CheckedSub<&u16>>::Output
fn checked_sub(self, rhs: &u16) -> <Decimal as CheckedSub<&u16>>::Output
Some(self - rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedSub<&u32> for &Decimalwhere
Decimal: CheckedSub<u32>,
impl CheckedSub<&u32> for &Decimalwhere Decimal: CheckedSub<u32>,
source§fn checked_sub(self, rhs: &u32) -> <&Decimal as CheckedSub<&u32>>::Output
fn checked_sub(self, rhs: &u32) -> <&Decimal as CheckedSub<&u32>>::Output
Some(self - rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedSub<&u32> for Decimalwhere
Decimal: CheckedSub<u32>,
impl CheckedSub<&u32> for Decimalwhere Decimal: CheckedSub<u32>,
source§fn checked_sub(self, rhs: &u32) -> <Decimal as CheckedSub<&u32>>::Output
fn checked_sub(self, rhs: &u32) -> <Decimal as CheckedSub<&u32>>::Output
Some(self - rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedSub<&u64> for &Decimalwhere
Decimal: CheckedSub<u64>,
impl CheckedSub<&u64> for &Decimalwhere Decimal: CheckedSub<u64>,
source§fn checked_sub(self, rhs: &u64) -> <&Decimal as CheckedSub<&u64>>::Output
fn checked_sub(self, rhs: &u64) -> <&Decimal as CheckedSub<&u64>>::Output
Some(self - rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedSub<&u64> for Decimalwhere
Decimal: CheckedSub<u64>,
impl CheckedSub<&u64> for Decimalwhere Decimal: CheckedSub<u64>,
source§fn checked_sub(self, rhs: &u64) -> <Decimal as CheckedSub<&u64>>::Output
fn checked_sub(self, rhs: &u64) -> <Decimal as CheckedSub<&u64>>::Output
Some(self - rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedSub<&u8> for &Decimalwhere
Decimal: CheckedSub<u8>,
impl CheckedSub<&u8> for &Decimalwhere Decimal: CheckedSub<u8>,
source§fn checked_sub(self, rhs: &u8) -> <&Decimal as CheckedSub<&u8>>::Output
fn checked_sub(self, rhs: &u8) -> <&Decimal as CheckedSub<&u8>>::Output
Some(self - rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedSub<&u8> for Decimalwhere
Decimal: CheckedSub<u8>,
impl CheckedSub<&u8> for Decimalwhere Decimal: CheckedSub<u8>,
source§fn checked_sub(self, rhs: &u8) -> <Decimal as CheckedSub<&u8>>::Output
fn checked_sub(self, rhs: &u8) -> <Decimal as CheckedSub<&u8>>::Output
Some(self - rhs)
or None
if the result can not be
represented by the Output
type.source§impl<'a> CheckedSub<Decimal> for &'a Decimalwhere
Decimal: CheckedSub<Decimal>,
impl<'a> CheckedSub<Decimal> for &'a Decimalwhere Decimal: CheckedSub<Decimal>,
§type Output = <Decimal as CheckedSub<Decimal>>::Output
type Output = <Decimal as CheckedSub<Decimal>>::Output
checked_sub
.source§fn checked_sub(
self,
rhs: Decimal
) -> <&'a Decimal as CheckedSub<Decimal>>::Output
fn checked_sub( self, rhs: Decimal ) -> <&'a Decimal as CheckedSub<Decimal>>::Output
Some(self - rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedSub<Decimal> for Decimal
impl CheckedSub<Decimal> for Decimal
source§impl<'a> CheckedSub<i128> for &'a Decimalwhere
Decimal: CheckedSub<i128>,
impl<'a> CheckedSub<i128> for &'a Decimalwhere Decimal: CheckedSub<i128>,
source§fn checked_sub(self, rhs: i128) -> <&'a Decimal as CheckedSub<i128>>::Output
fn checked_sub(self, rhs: i128) -> <&'a Decimal as CheckedSub<i128>>::Output
Some(self - rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedSub<i128> for Decimal
impl CheckedSub<i128> for Decimal
source§impl<'a> CheckedSub<i16> for &'a Decimalwhere
Decimal: CheckedSub<i16>,
impl<'a> CheckedSub<i16> for &'a Decimalwhere Decimal: CheckedSub<i16>,
source§fn checked_sub(self, rhs: i16) -> <&'a Decimal as CheckedSub<i16>>::Output
fn checked_sub(self, rhs: i16) -> <&'a Decimal as CheckedSub<i16>>::Output
Some(self - rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedSub<i16> for Decimal
impl CheckedSub<i16> for Decimal
source§impl<'a> CheckedSub<i32> for &'a Decimalwhere
Decimal: CheckedSub<i32>,
impl<'a> CheckedSub<i32> for &'a Decimalwhere Decimal: CheckedSub<i32>,
source§fn checked_sub(self, rhs: i32) -> <&'a Decimal as CheckedSub<i32>>::Output
fn checked_sub(self, rhs: i32) -> <&'a Decimal as CheckedSub<i32>>::Output
Some(self - rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedSub<i32> for Decimal
impl CheckedSub<i32> for Decimal
source§impl<'a> CheckedSub<i64> for &'a Decimalwhere
Decimal: CheckedSub<i64>,
impl<'a> CheckedSub<i64> for &'a Decimalwhere Decimal: CheckedSub<i64>,
source§fn checked_sub(self, rhs: i64) -> <&'a Decimal as CheckedSub<i64>>::Output
fn checked_sub(self, rhs: i64) -> <&'a Decimal as CheckedSub<i64>>::Output
Some(self - rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedSub<i64> for Decimal
impl CheckedSub<i64> for Decimal
source§impl<'a> CheckedSub<i8> for &'a Decimalwhere
Decimal: CheckedSub<i8>,
impl<'a> CheckedSub<i8> for &'a Decimalwhere Decimal: CheckedSub<i8>,
source§fn checked_sub(self, rhs: i8) -> <&'a Decimal as CheckedSub<i8>>::Output
fn checked_sub(self, rhs: i8) -> <&'a Decimal as CheckedSub<i8>>::Output
Some(self - rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedSub<i8> for Decimal
impl CheckedSub<i8> for Decimal
source§impl<'a> CheckedSub<u16> for &'a Decimalwhere
Decimal: CheckedSub<u16>,
impl<'a> CheckedSub<u16> for &'a Decimalwhere Decimal: CheckedSub<u16>,
source§fn checked_sub(self, rhs: u16) -> <&'a Decimal as CheckedSub<u16>>::Output
fn checked_sub(self, rhs: u16) -> <&'a Decimal as CheckedSub<u16>>::Output
Some(self - rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedSub<u16> for Decimal
impl CheckedSub<u16> for Decimal
source§impl<'a> CheckedSub<u32> for &'a Decimalwhere
Decimal: CheckedSub<u32>,
impl<'a> CheckedSub<u32> for &'a Decimalwhere Decimal: CheckedSub<u32>,
source§fn checked_sub(self, rhs: u32) -> <&'a Decimal as CheckedSub<u32>>::Output
fn checked_sub(self, rhs: u32) -> <&'a Decimal as CheckedSub<u32>>::Output
Some(self - rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedSub<u32> for Decimal
impl CheckedSub<u32> for Decimal
source§impl<'a> CheckedSub<u64> for &'a Decimalwhere
Decimal: CheckedSub<u64>,
impl<'a> CheckedSub<u64> for &'a Decimalwhere Decimal: CheckedSub<u64>,
source§fn checked_sub(self, rhs: u64) -> <&'a Decimal as CheckedSub<u64>>::Output
fn checked_sub(self, rhs: u64) -> <&'a Decimal as CheckedSub<u64>>::Output
Some(self - rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedSub<u64> for Decimal
impl CheckedSub<u64> for Decimal
source§impl<'a> CheckedSub<u8> for &'a Decimalwhere
Decimal: CheckedSub<u8>,
impl<'a> CheckedSub<u8> for &'a Decimalwhere Decimal: CheckedSub<u8>,
source§fn checked_sub(self, rhs: u8) -> <&'a Decimal as CheckedSub<u8>>::Output
fn checked_sub(self, rhs: u8) -> <&'a Decimal as CheckedSub<u8>>::Output
Some(self - rhs)
or None
if the result can not be
represented by the Output
type.source§impl CheckedSub<u8> for Decimal
impl CheckedSub<u8> for Decimal
source§impl Display for Decimal
impl Display for Decimal
source§fn fmt(&self, form: &mut Formatter<'_>) -> Result<(), Error>
fn fmt(&self, form: &mut Formatter<'_>) -> Result<(), Error>
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.
Examples:
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");
source§impl Div<Decimal> for BaseCurrency
impl Div<Decimal> for BaseCurrency
source§impl Div<Decimal> for QuoteCurrency
impl Div<Decimal> for QuoteCurrency
source§impl<T> DivAssign<T> for Decimalwhere
Decimal: Div<T, Output = Decimal>,
impl<T> DivAssign<T> for Decimalwhere Decimal: Div<T, Output = Decimal>,
source§fn div_assign(&mut self, rhs: T)
fn div_assign(&mut self, rhs: T)
/=
operation. Read moresource§impl DivRounded<&Decimal> for &Decimalwhere
Decimal: DivRounded<Decimal>,
impl DivRounded<&Decimal> for &Decimalwhere Decimal: DivRounded<Decimal>,
source§impl DivRounded<&Decimal> for Decimalwhere
Decimal: DivRounded<Decimal>,
impl DivRounded<&Decimal> for Decimalwhere Decimal: DivRounded<Decimal>,
source§impl DivRounded<&i128> for &Decimalwhere
Decimal: DivRounded<i128>,
impl DivRounded<&i128> for &Decimalwhere Decimal: DivRounded<i128>,
source§fn div_rounded(
self,
rhs: &i128,
n_frac_digits: u8
) -> <&Decimal as DivRounded<&i128>>::Output
fn div_rounded( self, rhs: &i128, n_frac_digits: u8 ) -> <&Decimal as DivRounded<&i128>>::Output
source§impl DivRounded<&i128> for Decimalwhere
Decimal: DivRounded<i128>,
impl DivRounded<&i128> for Decimalwhere Decimal: DivRounded<i128>,
source§fn div_rounded(
self,
rhs: &i128,
n_frac_digits: u8
) -> <Decimal as DivRounded<&i128>>::Output
fn div_rounded( self, rhs: &i128, n_frac_digits: u8 ) -> <Decimal as DivRounded<&i128>>::Output
source§impl DivRounded<&i16> for &Decimalwhere
Decimal: DivRounded<i16>,
impl DivRounded<&i16> for &Decimalwhere Decimal: DivRounded<i16>,
source§fn div_rounded(
self,
rhs: &i16,
n_frac_digits: u8
) -> <&Decimal as DivRounded<&i16>>::Output
fn div_rounded( self, rhs: &i16, n_frac_digits: u8 ) -> <&Decimal as DivRounded<&i16>>::Output
source§impl DivRounded<&i16> for Decimalwhere
Decimal: DivRounded<i16>,
impl DivRounded<&i16> for Decimalwhere Decimal: DivRounded<i16>,
source§fn div_rounded(
self,
rhs: &i16,
n_frac_digits: u8
) -> <Decimal as DivRounded<&i16>>::Output
fn div_rounded( self, rhs: &i16, n_frac_digits: u8 ) -> <Decimal as DivRounded<&i16>>::Output
source§impl DivRounded<&i32> for &Decimalwhere
Decimal: DivRounded<i32>,
impl DivRounded<&i32> for &Decimalwhere Decimal: DivRounded<i32>,
source§fn div_rounded(
self,
rhs: &i32,
n_frac_digits: u8
) -> <&Decimal as DivRounded<&i32>>::Output
fn div_rounded( self, rhs: &i32, n_frac_digits: u8 ) -> <&Decimal as DivRounded<&i32>>::Output
source§impl DivRounded<&i32> for Decimalwhere
Decimal: DivRounded<i32>,
impl DivRounded<&i32> for Decimalwhere Decimal: DivRounded<i32>,
source§fn div_rounded(
self,
rhs: &i32,
n_frac_digits: u8
) -> <Decimal as DivRounded<&i32>>::Output
fn div_rounded( self, rhs: &i32, n_frac_digits: u8 ) -> <Decimal as DivRounded<&i32>>::Output
source§impl DivRounded<&i64> for &Decimalwhere
Decimal: DivRounded<i64>,
impl DivRounded<&i64> for &Decimalwhere Decimal: DivRounded<i64>,
source§fn div_rounded(
self,
rhs: &i64,
n_frac_digits: u8
) -> <&Decimal as DivRounded<&i64>>::Output
fn div_rounded( self, rhs: &i64, n_frac_digits: u8 ) -> <&Decimal as DivRounded<&i64>>::Output
source§impl DivRounded<&i64> for Decimalwhere
Decimal: DivRounded<i64>,
impl DivRounded<&i64> for Decimalwhere Decimal: DivRounded<i64>,
source§fn div_rounded(
self,
rhs: &i64,
n_frac_digits: u8
) -> <Decimal as DivRounded<&i64>>::Output
fn div_rounded( self, rhs: &i64, n_frac_digits: u8 ) -> <Decimal as DivRounded<&i64>>::Output
source§impl DivRounded<&i8> for &Decimalwhere
Decimal: DivRounded<i8>,
impl DivRounded<&i8> for &Decimalwhere Decimal: DivRounded<i8>,
source§fn div_rounded(
self,
rhs: &i8,
n_frac_digits: u8
) -> <&Decimal as DivRounded<&i8>>::Output
fn div_rounded( self, rhs: &i8, n_frac_digits: u8 ) -> <&Decimal as DivRounded<&i8>>::Output
source§impl DivRounded<&i8> for Decimalwhere
Decimal: DivRounded<i8>,
impl DivRounded<&i8> for Decimalwhere Decimal: DivRounded<i8>,
source§fn div_rounded(
self,
rhs: &i8,
n_frac_digits: u8
) -> <Decimal as DivRounded<&i8>>::Output
fn div_rounded( self, rhs: &i8, n_frac_digits: u8 ) -> <Decimal as DivRounded<&i8>>::Output
source§impl DivRounded<&u16> for &Decimalwhere
Decimal: DivRounded<u16>,
impl DivRounded<&u16> for &Decimalwhere Decimal: DivRounded<u16>,
source§fn div_rounded(
self,
rhs: &u16,
n_frac_digits: u8
) -> <&Decimal as DivRounded<&u16>>::Output
fn div_rounded( self, rhs: &u16, n_frac_digits: u8 ) -> <&Decimal as DivRounded<&u16>>::Output
source§impl DivRounded<&u16> for Decimalwhere
Decimal: DivRounded<u16>,
impl DivRounded<&u16> for Decimalwhere Decimal: DivRounded<u16>,
source§fn div_rounded(
self,
rhs: &u16,
n_frac_digits: u8
) -> <Decimal as DivRounded<&u16>>::Output
fn div_rounded( self, rhs: &u16, n_frac_digits: u8 ) -> <Decimal as DivRounded<&u16>>::Output
source§impl DivRounded<&u32> for &Decimalwhere
Decimal: DivRounded<u32>,
impl DivRounded<&u32> for &Decimalwhere Decimal: DivRounded<u32>,
source§fn div_rounded(
self,
rhs: &u32,
n_frac_digits: u8
) -> <&Decimal as DivRounded<&u32>>::Output
fn div_rounded( self, rhs: &u32, n_frac_digits: u8 ) -> <&Decimal as DivRounded<&u32>>::Output
source§impl DivRounded<&u32> for Decimalwhere
Decimal: DivRounded<u32>,
impl DivRounded<&u32> for Decimalwhere Decimal: DivRounded<u32>,
source§fn div_rounded(
self,
rhs: &u32,
n_frac_digits: u8
) -> <Decimal as DivRounded<&u32>>::Output
fn div_rounded( self, rhs: &u32, n_frac_digits: u8 ) -> <Decimal as DivRounded<&u32>>::Output
source§impl DivRounded<&u64> for &Decimalwhere
Decimal: DivRounded<u64>,
impl DivRounded<&u64> for &Decimalwhere Decimal: DivRounded<u64>,
source§fn div_rounded(
self,
rhs: &u64,
n_frac_digits: u8
) -> <&Decimal as DivRounded<&u64>>::Output
fn div_rounded( self, rhs: &u64, n_frac_digits: u8 ) -> <&Decimal as DivRounded<&u64>>::Output
source§impl DivRounded<&u64> for Decimalwhere
Decimal: DivRounded<u64>,
impl DivRounded<&u64> for Decimalwhere Decimal: DivRounded<u64>,
source§fn div_rounded(
self,
rhs: &u64,
n_frac_digits: u8
) -> <Decimal as DivRounded<&u64>>::Output
fn div_rounded( self, rhs: &u64, n_frac_digits: u8 ) -> <Decimal as DivRounded<&u64>>::Output
source§impl DivRounded<&u8> for &Decimalwhere
Decimal: DivRounded<u8>,
impl DivRounded<&u8> for &Decimalwhere Decimal: DivRounded<u8>,
source§fn div_rounded(
self,
rhs: &u8,
n_frac_digits: u8
) -> <&Decimal as DivRounded<&u8>>::Output
fn div_rounded( self, rhs: &u8, n_frac_digits: u8 ) -> <&Decimal as DivRounded<&u8>>::Output
source§impl DivRounded<&u8> for Decimalwhere
Decimal: DivRounded<u8>,
impl DivRounded<&u8> for Decimalwhere Decimal: DivRounded<u8>,
source§fn div_rounded(
self,
rhs: &u8,
n_frac_digits: u8
) -> <Decimal as DivRounded<&u8>>::Output
fn div_rounded( self, rhs: &u8, n_frac_digits: u8 ) -> <Decimal as DivRounded<&u8>>::Output
source§impl<'a> DivRounded<Decimal> for &'a Decimalwhere
Decimal: DivRounded<Decimal>,
impl<'a> DivRounded<Decimal> for &'a Decimalwhere Decimal: DivRounded<Decimal>,
source§impl DivRounded<Decimal> for Decimal
impl DivRounded<Decimal> for Decimal
source§fn div_rounded(
self,
rhs: Decimal,
n_frac_digits: u8
) -> <Decimal as DivRounded<Decimal>>::Output
fn div_rounded( self, rhs: Decimal, n_frac_digits: u8 ) -> <Decimal as DivRounded<Decimal>>::Output
source§impl<'a> DivRounded<i128> for &'a Decimalwhere
Decimal: DivRounded<i128>,
impl<'a> DivRounded<i128> for &'a Decimalwhere Decimal: DivRounded<i128>,
source§fn div_rounded(
self,
rhs: i128,
n_frac_digits: u8
) -> <&'a Decimal as DivRounded<i128>>::Output
fn div_rounded( self, rhs: i128, n_frac_digits: u8 ) -> <&'a Decimal as DivRounded<i128>>::Output
source§impl DivRounded<i128> for Decimal
impl DivRounded<i128> for Decimal
source§fn div_rounded(
self,
rhs: i128,
n_frac_digits: u8
) -> <Decimal as DivRounded<i128>>::Output
fn div_rounded( self, rhs: i128, n_frac_digits: u8 ) -> <Decimal as DivRounded<i128>>::Output
source§impl<'a> DivRounded<i16> for &'a Decimalwhere
Decimal: DivRounded<i16>,
impl<'a> DivRounded<i16> for &'a Decimalwhere Decimal: DivRounded<i16>,
source§fn div_rounded(
self,
rhs: i16,
n_frac_digits: u8
) -> <&'a Decimal as DivRounded<i16>>::Output
fn div_rounded( self, rhs: i16, n_frac_digits: u8 ) -> <&'a Decimal as DivRounded<i16>>::Output
source§impl DivRounded<i16> for Decimal
impl DivRounded<i16> for Decimal
source§fn div_rounded(
self,
rhs: i16,
n_frac_digits: u8
) -> <Decimal as DivRounded<i16>>::Output
fn div_rounded( self, rhs: i16, n_frac_digits: u8 ) -> <Decimal as DivRounded<i16>>::Output
source§impl<'a> DivRounded<i32> for &'a Decimalwhere
Decimal: DivRounded<i32>,
impl<'a> DivRounded<i32> for &'a Decimalwhere Decimal: DivRounded<i32>,
source§fn div_rounded(
self,
rhs: i32,
n_frac_digits: u8
) -> <&'a Decimal as DivRounded<i32>>::Output
fn div_rounded( self, rhs: i32, n_frac_digits: u8 ) -> <&'a Decimal as DivRounded<i32>>::Output
source§impl DivRounded<i32> for Decimal
impl DivRounded<i32> for Decimal
source§fn div_rounded(
self,
rhs: i32,
n_frac_digits: u8
) -> <Decimal as DivRounded<i32>>::Output
fn div_rounded( self, rhs: i32, n_frac_digits: u8 ) -> <Decimal as DivRounded<i32>>::Output
source§impl<'a> DivRounded<i64> for &'a Decimalwhere
Decimal: DivRounded<i64>,
impl<'a> DivRounded<i64> for &'a Decimalwhere Decimal: DivRounded<i64>,
source§fn div_rounded(
self,
rhs: i64,
n_frac_digits: u8
) -> <&'a Decimal as DivRounded<i64>>::Output
fn div_rounded( self, rhs: i64, n_frac_digits: u8 ) -> <&'a Decimal as DivRounded<i64>>::Output
source§impl DivRounded<i64> for Decimal
impl DivRounded<i64> for Decimal
source§fn div_rounded(
self,
rhs: i64,
n_frac_digits: u8
) -> <Decimal as DivRounded<i64>>::Output
fn div_rounded( self, rhs: i64, n_frac_digits: u8 ) -> <Decimal as DivRounded<i64>>::Output
source§impl<'a> DivRounded<i8> for &'a Decimalwhere
Decimal: DivRounded<i8>,
impl<'a> DivRounded<i8> for &'a Decimalwhere Decimal: DivRounded<i8>,
source§fn div_rounded(
self,
rhs: i8,
n_frac_digits: u8
) -> <&'a Decimal as DivRounded<i8>>::Output
fn div_rounded( self, rhs: i8, n_frac_digits: u8 ) -> <&'a Decimal as DivRounded<i8>>::Output
source§impl DivRounded<i8> for Decimal
impl DivRounded<i8> for Decimal
source§fn div_rounded(
self,
rhs: i8,
n_frac_digits: u8
) -> <Decimal as DivRounded<i8>>::Output
fn div_rounded( self, rhs: i8, n_frac_digits: u8 ) -> <Decimal as DivRounded<i8>>::Output
source§impl<'a> DivRounded<u16> for &'a Decimalwhere
Decimal: DivRounded<u16>,
impl<'a> DivRounded<u16> for &'a Decimalwhere Decimal: DivRounded<u16>,
source§fn div_rounded(
self,
rhs: u16,
n_frac_digits: u8
) -> <&'a Decimal as DivRounded<u16>>::Output
fn div_rounded( self, rhs: u16, n_frac_digits: u8 ) -> <&'a Decimal as DivRounded<u16>>::Output
source§impl DivRounded<u16> for Decimal
impl DivRounded<u16> for Decimal
source§fn div_rounded(
self,
rhs: u16,
n_frac_digits: u8
) -> <Decimal as DivRounded<u16>>::Output
fn div_rounded( self, rhs: u16, n_frac_digits: u8 ) -> <Decimal as DivRounded<u16>>::Output
source§impl<'a> DivRounded<u32> for &'a Decimalwhere
Decimal: DivRounded<u32>,
impl<'a> DivRounded<u32> for &'a Decimalwhere Decimal: DivRounded<u32>,
source§fn div_rounded(
self,
rhs: u32,
n_frac_digits: u8
) -> <&'a Decimal as DivRounded<u32>>::Output
fn div_rounded( self, rhs: u32, n_frac_digits: u8 ) -> <&'a Decimal as DivRounded<u32>>::Output
source§impl DivRounded<u32> for Decimal
impl DivRounded<u32> for Decimal
source§fn div_rounded(
self,
rhs: u32,
n_frac_digits: u8
) -> <Decimal as DivRounded<u32>>::Output
fn div_rounded( self, rhs: u32, n_frac_digits: u8 ) -> <Decimal as DivRounded<u32>>::Output
source§impl<'a> DivRounded<u64> for &'a Decimalwhere
Decimal: DivRounded<u64>,
impl<'a> DivRounded<u64> for &'a Decimalwhere Decimal: DivRounded<u64>,
source§fn div_rounded(
self,
rhs: u64,
n_frac_digits: u8
) -> <&'a Decimal as DivRounded<u64>>::Output
fn div_rounded( self, rhs: u64, n_frac_digits: u8 ) -> <&'a Decimal as DivRounded<u64>>::Output
source§impl DivRounded<u64> for Decimal
impl DivRounded<u64> for Decimal
source§fn div_rounded(
self,
rhs: u64,
n_frac_digits: u8
) -> <Decimal as DivRounded<u64>>::Output
fn div_rounded( self, rhs: u64, n_frac_digits: u8 ) -> <Decimal as DivRounded<u64>>::Output
source§impl<'a> DivRounded<u8> for &'a Decimalwhere
Decimal: DivRounded<u8>,
impl<'a> DivRounded<u8> for &'a Decimalwhere Decimal: DivRounded<u8>,
source§fn div_rounded(
self,
rhs: u8,
n_frac_digits: u8
) -> <&'a Decimal as DivRounded<u8>>::Output
fn div_rounded( self, rhs: u8, n_frac_digits: u8 ) -> <&'a Decimal as DivRounded<u8>>::Output
source§impl DivRounded<u8> for Decimal
impl DivRounded<u8> for Decimal
source§fn div_rounded(
self,
rhs: u8,
n_frac_digits: u8
) -> <Decimal as DivRounded<u8>>::Output
fn div_rounded( self, rhs: u8, n_frac_digits: u8 ) -> <Decimal as DivRounded<u8>>::Output
source§impl From<BaseCurrency> for Decimal
impl From<BaseCurrency> for Decimal
source§fn from(original: BaseCurrency) -> Self
fn from(original: BaseCurrency) -> Self
source§impl From<Decimal> for BaseCurrency
impl From<Decimal> for BaseCurrency
source§fn from(original: Decimal) -> BaseCurrency
fn from(original: Decimal) -> BaseCurrency
source§impl From<Decimal> for QuoteCurrency
impl From<Decimal> for QuoteCurrency
source§fn from(original: Decimal) -> QuoteCurrency
fn from(original: Decimal) -> QuoteCurrency
source§impl From<QuoteCurrency> for Decimal
impl From<QuoteCurrency> for Decimal
source§fn from(original: QuoteCurrency) -> Self
fn from(original: QuoteCurrency) -> Self
source§impl FromStr for Decimal
impl FromStr for Decimal
source§fn from_str(lit: &str) -> Result<Decimal, <Decimal as FromStr>::Err>
fn from_str(lit: &str) -> Result<Decimal, <Decimal as FromStr>::Err>
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 inlit
exceeds [crate::MAX_N_FRAC_DIGITS] ->ParseDecimalError::FracDigitLimitExceeded
- The given decimal literal exceeds the internal representation of
Decimal
-> ParseDecimalError::InternalOverflow
Examples:
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");
source§impl Mul<Decimal> for BaseCurrency
impl Mul<Decimal> for BaseCurrency
source§impl Mul<Decimal> for QuoteCurrency
impl Mul<Decimal> for QuoteCurrency
source§impl<T> MulAssign<T> for Decimalwhere
Decimal: Mul<T, Output = Decimal>,
impl<T> MulAssign<T> for Decimalwhere Decimal: Mul<T, Output = Decimal>,
source§fn mul_assign(&mut self, rhs: T)
fn mul_assign(&mut self, rhs: T)
*=
operation. Read moresource§impl MulRounded<&Decimal> for &Decimalwhere
Decimal: MulRounded<Decimal>,
impl MulRounded<&Decimal> for &Decimalwhere Decimal: MulRounded<Decimal>,
source§impl MulRounded<&Decimal> for Decimalwhere
Decimal: MulRounded<Decimal>,
impl MulRounded<&Decimal> for Decimalwhere Decimal: MulRounded<Decimal>,
source§impl<'a> MulRounded<Decimal> for &'a Decimalwhere
Decimal: MulRounded<Decimal>,
impl<'a> MulRounded<Decimal> for &'a Decimalwhere Decimal: MulRounded<Decimal>,
source§impl MulRounded<Decimal> for Decimal
impl MulRounded<Decimal> for Decimal
source§impl Ord for Decimal
impl Ord for Decimal
source§impl PartialEq<Decimal> for Decimal
impl PartialEq<Decimal> for Decimal
source§impl PartialEq<i128> for Decimal
impl PartialEq<i128> for Decimal
source§impl PartialOrd<Decimal> for Decimal
impl PartialOrd<Decimal> for Decimal
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl PartialOrd<i128> for Decimal
impl PartialOrd<i128> for Decimal
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl PartialOrd<i16> for Decimal
impl PartialOrd<i16> for Decimal
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl PartialOrd<i32> for Decimal
impl PartialOrd<i32> for Decimal
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl PartialOrd<i64> for Decimal
impl PartialOrd<i64> for Decimal
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl PartialOrd<i8> for Decimal
impl PartialOrd<i8> for Decimal
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl PartialOrd<u16> for Decimal
impl PartialOrd<u16> for Decimal
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl PartialOrd<u32> for Decimal
impl PartialOrd<u32> for Decimal
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl PartialOrd<u64> for Decimal
impl PartialOrd<u64> for Decimal
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl PartialOrd<u8> for Decimal
impl PartialOrd<u8> for Decimal
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl<T> RemAssign<T> for Decimalwhere
Decimal: Rem<T, Output = Decimal>,
impl<T> RemAssign<T> for Decimalwhere Decimal: Rem<T, Output = Decimal>,
source§fn rem_assign(&mut self, rhs: T)
fn rem_assign(&mut self, rhs: T)
%=
operation. Read moresource§impl Round for Decimal
impl Round for Decimal
source§fn round(self, n_frac_digits: i8) -> Decimal
fn round(self, n_frac_digits: i8) -> Decimal
Returns a new Decimal
with its value rounded to n_frac_digits
fractional digits according to the current [RoundingMode].
Panics
Panics if the resulting value can not be represented by Decimal
!
Examples
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");
source§fn checked_round(self, n_frac_digits: i8) -> Option<Decimal>
fn checked_round(self, n_frac_digits: i8) -> Option<Decimal>
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
.
Examples
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());
source§impl Sub<Decimal> for BaseCurrency
impl Sub<Decimal> for BaseCurrency
source§impl Sub<Decimal> for QuoteCurrency
impl Sub<Decimal> for QuoteCurrency
source§impl<T> SubAssign<T> for Decimalwhere
Decimal: Sub<T, Output = Decimal>,
impl<T> SubAssign<T> for Decimalwhere Decimal: Sub<T, Output = Decimal>,
source§fn sub_assign(&mut self, rhs: T)
fn sub_assign(&mut self, rhs: T)
-=
operation. Read moresource§impl TryFrom<f32> for Decimal
impl TryFrom<f32> for Decimal
source§fn try_from(f: f32) -> Result<Decimal, <Decimal as TryFrom<f32>>::Error>
fn try_from(f: f32) -> Result<Decimal, <Decimal as TryFrom<f32>>::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");
§type Error = DecimalError
type Error = DecimalError
source§impl TryFrom<f64> for Decimal
impl TryFrom<f64> for Decimal
source§fn try_from(f: f64) -> Result<Decimal, <Decimal as TryFrom<f64>>::Error>
fn try_from(f: f64) -> Result<Decimal, <Decimal as TryFrom<f64>>::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.000500299999998788");