Struct lfest::prelude::Decimal

source ·
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

source

pub const fn eq_zero(&self) -> bool

Returns true if self is equal to zero.

source

pub fn eq_one(&self) -> bool

Returns true if self is equal to one.

source

pub const fn is_negative(&self) -> bool

Returns true if self is less than zero.

source

pub const fn is_positive(&self) -> bool

Returns true if self is greater than zero.

source§

impl Decimal

source

pub const fn abs(&self) -> Decimal

Returns the absolute value of self.

source

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");
source

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

pub fn trunc(&self) -> Decimal

Returns the integral part of self.

Examples
let d = Dec!(17.5);
assert_eq!(d.trunc().to_string(), "17");
let d = Dec!(-17.55555);
assert_eq!(d.trunc().to_string(), "-17");
source

pub fn fract(&self) -> Decimal

Returns the fractional part of self.

Examples
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");
source§

impl Decimal

source

pub const fn coefficient(self) -> i128

Coefficient of self.

source

pub const fn n_frac_digits(self) -> u8

Number of fractional decimal digits of self.

source

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);
source

pub const ZERO: Decimal = Self{ coeff: 0, n_frac_digits: 0,}

Additive identity

source

pub const ONE: Decimal = Self{ coeff: 1, n_frac_digits: 0,}

Multiplicative identity

source

pub const NEG_ONE: Decimal = Self{ coeff: -1, n_frac_digits: 0,}

Multiplicative negator

source

pub const TWO: Decimal = Self{ coeff: 2, n_frac_digits: 0,}

Equivalent of 2

source

pub const TEN: Decimal = Self{ coeff: 10, n_frac_digits: 0,}

Equivalent of 10

source

pub const MAX: Decimal = Self{ coeff: i128::MAX, n_frac_digits: 0,}

Maximum value representable by Decimal

source

pub const MIN: Decimal = Self{ coeff: i128::MIN, n_frac_digits: 0,}

Minimum value representable by Decimal

source

pub const DELTA: Decimal = Self{ coeff: 1i128, n_frac_digits: MAX_N_FRAC_DIGITS,}

Smallest absolute difference between two non-equal values of Decimal

Trait Implementations§

source§

impl Add<&Decimal> for &Decimalwhere Decimal: Add<Decimal>,

§

type Output = <Decimal as Add<Decimal>>::Output

The resulting type after applying the + operator.
source§

fn add(self, rhs: &Decimal) -> <&Decimal as Add<&Decimal>>::Output

Performs the + operation. Read more
source§

impl Add<&Decimal> for Decimalwhere Decimal: Add<Decimal>,

§

type Output = <Decimal as Add<Decimal>>::Output

The resulting type after applying the + operator.
source§

fn add(self, rhs: &Decimal) -> <Decimal as Add<&Decimal>>::Output

Performs the + operation. Read more
source§

impl Add<&i128> for &Decimalwhere Decimal: Add<i128>,

§

type Output = <Decimal as Add<i128>>::Output

The resulting type after applying the + operator.
source§

fn add(self, rhs: &i128) -> <&Decimal as Add<&i128>>::Output

Performs the + operation. Read more
source§

impl Add<&i128> for Decimalwhere Decimal: Add<i128>,

§

type Output = <Decimal as Add<i128>>::Output

The resulting type after applying the + operator.
source§

fn add(self, rhs: &i128) -> <Decimal as Add<&i128>>::Output

Performs the + operation. Read more
source§

impl Add<&i16> for &Decimalwhere Decimal: Add<i16>,

§

type Output = <Decimal as Add<i16>>::Output

The resulting type after applying the + operator.
source§

fn add(self, rhs: &i16) -> <&Decimal as Add<&i16>>::Output

Performs the + operation. Read more
source§

impl Add<&i16> for Decimalwhere Decimal: Add<i16>,

§

type Output = <Decimal as Add<i16>>::Output

The resulting type after applying the + operator.
source§

fn add(self, rhs: &i16) -> <Decimal as Add<&i16>>::Output

Performs the + operation. Read more
source§

impl Add<&i32> for &Decimalwhere Decimal: Add<i32>,

§

type Output = <Decimal as Add<i32>>::Output

The resulting type after applying the + operator.
source§

fn add(self, rhs: &i32) -> <&Decimal as Add<&i32>>::Output

Performs the + operation. Read more
source§

impl Add<&i32> for Decimalwhere Decimal: Add<i32>,

§

type Output = <Decimal as Add<i32>>::Output

The resulting type after applying the + operator.
source§

fn add(self, rhs: &i32) -> <Decimal as Add<&i32>>::Output

Performs the + operation. Read more
source§

impl Add<&i64> for &Decimalwhere Decimal: Add<i64>,

§

type Output = <Decimal as Add<i64>>::Output

The resulting type after applying the + operator.
source§

fn add(self, rhs: &i64) -> <&Decimal as Add<&i64>>::Output

Performs the + operation. Read more
source§

impl Add<&i64> for Decimalwhere Decimal: Add<i64>,

§

type Output = <Decimal as Add<i64>>::Output

The resulting type after applying the + operator.
source§

fn add(self, rhs: &i64) -> <Decimal as Add<&i64>>::Output

Performs the + operation. Read more
source§

impl Add<&i8> for &Decimalwhere Decimal: Add<i8>,

§

type Output = <Decimal as Add<i8>>::Output

The resulting type after applying the + operator.
source§

fn add(self, rhs: &i8) -> <&Decimal as Add<&i8>>::Output

Performs the + operation. Read more
source§

impl Add<&i8> for Decimalwhere Decimal: Add<i8>,

§

type Output = <Decimal as Add<i8>>::Output

The resulting type after applying the + operator.
source§

fn add(self, rhs: &i8) -> <Decimal as Add<&i8>>::Output

Performs the + operation. Read more
source§

impl Add<&u16> for &Decimalwhere Decimal: Add<u16>,

§

type Output = <Decimal as Add<u16>>::Output

The resulting type after applying the + operator.
source§

fn add(self, rhs: &u16) -> <&Decimal as Add<&u16>>::Output

Performs the + operation. Read more
source§

impl Add<&u16> for Decimalwhere Decimal: Add<u16>,

§

type Output = <Decimal as Add<u16>>::Output

The resulting type after applying the + operator.
source§

fn add(self, rhs: &u16) -> <Decimal as Add<&u16>>::Output

Performs the + operation. Read more
source§

impl Add<&u32> for &Decimalwhere Decimal: Add<u32>,

§

type Output = <Decimal as Add<u32>>::Output

The resulting type after applying the + operator.
source§

fn add(self, rhs: &u32) -> <&Decimal as Add<&u32>>::Output

Performs the + operation. Read more
source§

impl Add<&u32> for Decimalwhere Decimal: Add<u32>,

§

type Output = <Decimal as Add<u32>>::Output

The resulting type after applying the + operator.
source§

fn add(self, rhs: &u32) -> <Decimal as Add<&u32>>::Output

Performs the + operation. Read more
source§

impl Add<&u64> for &Decimalwhere Decimal: Add<u64>,

§

type Output = <Decimal as Add<u64>>::Output

The resulting type after applying the + operator.
source§

fn add(self, rhs: &u64) -> <&Decimal as Add<&u64>>::Output

Performs the + operation. Read more
source§

impl Add<&u64> for Decimalwhere Decimal: Add<u64>,

§

type Output = <Decimal as Add<u64>>::Output

The resulting type after applying the + operator.
source§

fn add(self, rhs: &u64) -> <Decimal as Add<&u64>>::Output

Performs the + operation. Read more
source§

impl Add<&u8> for &Decimalwhere Decimal: Add<u8>,

§

type Output = <Decimal as Add<u8>>::Output

The resulting type after applying the + operator.
source§

fn add(self, rhs: &u8) -> <&Decimal as Add<&u8>>::Output

Performs the + operation. Read more
source§

impl Add<&u8> for Decimalwhere Decimal: Add<u8>,

§

type Output = <Decimal as Add<u8>>::Output

The resulting type after applying the + operator.
source§

fn add(self, rhs: &u8) -> <Decimal as Add<&u8>>::Output

Performs the + operation. Read more
source§

impl<'a> Add<Decimal> for &'a Decimalwhere Decimal: Add<Decimal>,

§

type Output = <Decimal as Add<Decimal>>::Output

The resulting type after applying the + operator.
source§

fn add(self, rhs: Decimal) -> <&'a Decimal as Add<Decimal>>::Output

Performs the + operation. Read more
source§

impl Add<Decimal> for BaseCurrency

§

type Output = BaseCurrency

The resulting type after applying the + operator.
source§

fn add(self, rhs: Decimal) -> Self::Output

Performs the + operation. Read more
source§

impl Add<Decimal> for Decimal

§

type Output = Decimal

The resulting type after applying the + operator.
source§

fn add(self, rhs: Decimal) -> <Decimal as Add<Decimal>>::Output

Performs the + operation. Read more
source§

impl Add<Decimal> for QuoteCurrency

§

type Output = QuoteCurrency

The resulting type after applying the + operator.
source§

fn add(self, rhs: Decimal) -> Self::Output

Performs the + operation. Read more
source§

impl<'a> Add<i128> for &'a Decimalwhere Decimal: Add<i128>,

§

type Output = <Decimal as Add<i128>>::Output

The resulting type after applying the + operator.
source§

fn add(self, rhs: i128) -> <&'a Decimal as Add<i128>>::Output

Performs the + operation. Read more
source§

impl Add<i128> for Decimal

§

type Output = Decimal

The resulting type after applying the + operator.
source§

fn add(self, rhs: i128) -> <Decimal as Add<i128>>::Output

Performs the + operation. Read more
source§

impl<'a> Add<i16> for &'a Decimalwhere Decimal: Add<i16>,

§

type Output = <Decimal as Add<i16>>::Output

The resulting type after applying the + operator.
source§

fn add(self, rhs: i16) -> <&'a Decimal as Add<i16>>::Output

Performs the + operation. Read more
source§

impl Add<i16> for Decimal

§

type Output = Decimal

The resulting type after applying the + operator.
source§

fn add(self, rhs: i16) -> <Decimal as Add<i16>>::Output

Performs the + operation. Read more
source§

impl<'a> Add<i32> for &'a Decimalwhere Decimal: Add<i32>,

§

type Output = <Decimal as Add<i32>>::Output

The resulting type after applying the + operator.
source§

fn add(self, rhs: i32) -> <&'a Decimal as Add<i32>>::Output

Performs the + operation. Read more
source§

impl Add<i32> for Decimal

§

type Output = Decimal

The resulting type after applying the + operator.
source§

fn add(self, rhs: i32) -> <Decimal as Add<i32>>::Output

Performs the + operation. Read more
source§

impl<'a> Add<i64> for &'a Decimalwhere Decimal: Add<i64>,

§

type Output = <Decimal as Add<i64>>::Output

The resulting type after applying the + operator.
source§

fn add(self, rhs: i64) -> <&'a Decimal as Add<i64>>::Output

Performs the + operation. Read more
source§

impl Add<i64> for Decimal

§

type Output = Decimal

The resulting type after applying the + operator.
source§

fn add(self, rhs: i64) -> <Decimal as Add<i64>>::Output

Performs the + operation. Read more
source§

impl<'a> Add<i8> for &'a Decimalwhere Decimal: Add<i8>,

§

type Output = <Decimal as Add<i8>>::Output

The resulting type after applying the + operator.
source§

fn add(self, rhs: i8) -> <&'a Decimal as Add<i8>>::Output

Performs the + operation. Read more
source§

impl Add<i8> for Decimal

§

type Output = Decimal

The resulting type after applying the + operator.
source§

fn add(self, rhs: i8) -> <Decimal as Add<i8>>::Output

Performs the + operation. Read more
source§

impl<'a> Add<u16> for &'a Decimalwhere Decimal: Add<u16>,

§

type Output = <Decimal as Add<u16>>::Output

The resulting type after applying the + operator.
source§

fn add(self, rhs: u16) -> <&'a Decimal as Add<u16>>::Output

Performs the + operation. Read more
source§

impl Add<u16> for Decimal

§

type Output = Decimal

The resulting type after applying the + operator.
source§

fn add(self, rhs: u16) -> <Decimal as Add<u16>>::Output

Performs the + operation. Read more
source§

impl<'a> Add<u32> for &'a Decimalwhere Decimal: Add<u32>,

§

type Output = <Decimal as Add<u32>>::Output

The resulting type after applying the + operator.
source§

fn add(self, rhs: u32) -> <&'a Decimal as Add<u32>>::Output

Performs the + operation. Read more
source§

impl Add<u32> for Decimal

§

type Output = Decimal

The resulting type after applying the + operator.
source§

fn add(self, rhs: u32) -> <Decimal as Add<u32>>::Output

Performs the + operation. Read more
source§

impl<'a> Add<u64> for &'a Decimalwhere Decimal: Add<u64>,

§

type Output = <Decimal as Add<u64>>::Output

The resulting type after applying the + operator.
source§

fn add(self, rhs: u64) -> <&'a Decimal as Add<u64>>::Output

Performs the + operation. Read more
source§

impl Add<u64> for Decimal

§

type Output = Decimal

The resulting type after applying the + operator.
source§

fn add(self, rhs: u64) -> <Decimal as Add<u64>>::Output

Performs the + operation. Read more
source§

impl<'a> Add<u8> for &'a Decimalwhere Decimal: Add<u8>,

§

type Output = <Decimal as Add<u8>>::Output

The resulting type after applying the + operator.
source§

fn add(self, rhs: u8) -> <&'a Decimal as Add<u8>>::Output

Performs the + operation. Read more
source§

impl Add<u8> for Decimal

§

type Output = Decimal

The resulting type after applying the + operator.
source§

fn add(self, rhs: u8) -> <Decimal as Add<u8>>::Output

Performs the + operation. Read more
source§

impl<T> AddAssign<T> for Decimalwhere Decimal: Add<T, Output = Decimal>,

source§

fn add_assign(&mut self, rhs: T)

Performs the += operation. Read more
source§

impl AsIntegerRatio for Decimal

source§

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

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

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>,

§

type Output = <Decimal as CheckedAdd<Decimal>>::Output

The resulting type after applying checked_add.
source§

fn checked_add(self, rhs: &Decimal) -> <&Decimal as CheckedAdd<&Decimal>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedAdd<Decimal>>::Output

The resulting type after applying checked_add.
source§

fn checked_add(self, rhs: &Decimal) -> <Decimal as CheckedAdd<&Decimal>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedAdd<i128>>::Output

The resulting type after applying checked_add.
source§

fn checked_add(self, rhs: &i128) -> <&Decimal as CheckedAdd<&i128>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedAdd<i128>>::Output

The resulting type after applying checked_add.
source§

fn checked_add(self, rhs: &i128) -> <Decimal as CheckedAdd<&i128>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedAdd<i16>>::Output

The resulting type after applying checked_add.
source§

fn checked_add(self, rhs: &i16) -> <&Decimal as CheckedAdd<&i16>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedAdd<i16>>::Output

The resulting type after applying checked_add.
source§

fn checked_add(self, rhs: &i16) -> <Decimal as CheckedAdd<&i16>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedAdd<i32>>::Output

The resulting type after applying checked_add.
source§

fn checked_add(self, rhs: &i32) -> <&Decimal as CheckedAdd<&i32>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedAdd<i32>>::Output

The resulting type after applying checked_add.
source§

fn checked_add(self, rhs: &i32) -> <Decimal as CheckedAdd<&i32>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedAdd<i64>>::Output

The resulting type after applying checked_add.
source§

fn checked_add(self, rhs: &i64) -> <&Decimal as CheckedAdd<&i64>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedAdd<i64>>::Output

The resulting type after applying checked_add.
source§

fn checked_add(self, rhs: &i64) -> <Decimal as CheckedAdd<&i64>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedAdd<i8>>::Output

The resulting type after applying checked_add.
source§

fn checked_add(self, rhs: &i8) -> <&Decimal as CheckedAdd<&i8>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedAdd<i8>>::Output

The resulting type after applying checked_add.
source§

fn checked_add(self, rhs: &i8) -> <Decimal as CheckedAdd<&i8>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedAdd<u16>>::Output

The resulting type after applying checked_add.
source§

fn checked_add(self, rhs: &u16) -> <&Decimal as CheckedAdd<&u16>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedAdd<u16>>::Output

The resulting type after applying checked_add.
source§

fn checked_add(self, rhs: &u16) -> <Decimal as CheckedAdd<&u16>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedAdd<u32>>::Output

The resulting type after applying checked_add.
source§

fn checked_add(self, rhs: &u32) -> <&Decimal as CheckedAdd<&u32>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedAdd<u32>>::Output

The resulting type after applying checked_add.
source§

fn checked_add(self, rhs: &u32) -> <Decimal as CheckedAdd<&u32>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedAdd<u64>>::Output

The resulting type after applying checked_add.
source§

fn checked_add(self, rhs: &u64) -> <&Decimal as CheckedAdd<&u64>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedAdd<u64>>::Output

The resulting type after applying checked_add.
source§

fn checked_add(self, rhs: &u64) -> <Decimal as CheckedAdd<&u64>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedAdd<u8>>::Output

The resulting type after applying checked_add.
source§

fn checked_add(self, rhs: &u8) -> <&Decimal as CheckedAdd<&u8>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedAdd<u8>>::Output

The resulting type after applying checked_add.
source§

fn checked_add(self, rhs: &u8) -> <Decimal as CheckedAdd<&u8>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedAdd<Decimal>>::Output

The resulting type after applying checked_add.
source§

fn checked_add( self, rhs: Decimal ) -> <&'a Decimal as CheckedAdd<Decimal>>::Output

Returns Some(self + rhs) or None if the result can not be represented by the Output type.
source§

impl CheckedAdd<Decimal> for Decimal

§

type Output = Option<Decimal>

The resulting type after applying checked_add.
source§

fn checked_add(self, rhs: Decimal) -> <Decimal as CheckedAdd<Decimal>>::Output

Returns Some(self + rhs) or None if the result can not be represented by the Output type.
source§

impl<'a> CheckedAdd<i128> for &'a Decimalwhere Decimal: CheckedAdd<i128>,

§

type Output = <Decimal as CheckedAdd<i128>>::Output

The resulting type after applying checked_add.
source§

fn checked_add(self, rhs: i128) -> <&'a Decimal as CheckedAdd<i128>>::Output

Returns Some(self + rhs) or None if the result can not be represented by the Output type.
source§

impl CheckedAdd<i128> for Decimal

§

type Output = Option<Decimal>

The resulting type after applying checked_add.
source§

fn checked_add(self, rhs: i128) -> <Decimal as CheckedAdd<i128>>::Output

Returns Some(self + rhs) or None if the result can not be represented by the Output type.
source§

impl<'a> CheckedAdd<i16> for &'a Decimalwhere Decimal: CheckedAdd<i16>,

§

type Output = <Decimal as CheckedAdd<i16>>::Output

The resulting type after applying checked_add.
source§

fn checked_add(self, rhs: i16) -> <&'a Decimal as CheckedAdd<i16>>::Output

Returns Some(self + rhs) or None if the result can not be represented by the Output type.
source§

impl CheckedAdd<i16> for Decimal

§

type Output = Option<Decimal>

The resulting type after applying checked_add.
source§

fn checked_add(self, rhs: i16) -> <Decimal as CheckedAdd<i16>>::Output

Returns Some(self + rhs) or None if the result can not be represented by the Output type.
source§

impl<'a> CheckedAdd<i32> for &'a Decimalwhere Decimal: CheckedAdd<i32>,

§

type Output = <Decimal as CheckedAdd<i32>>::Output

The resulting type after applying checked_add.
source§

fn checked_add(self, rhs: i32) -> <&'a Decimal as CheckedAdd<i32>>::Output

Returns Some(self + rhs) or None if the result can not be represented by the Output type.
source§

impl CheckedAdd<i32> for Decimal

§

type Output = Option<Decimal>

The resulting type after applying checked_add.
source§

fn checked_add(self, rhs: i32) -> <Decimal as CheckedAdd<i32>>::Output

Returns Some(self + rhs) or None if the result can not be represented by the Output type.
source§

impl<'a> CheckedAdd<i64> for &'a Decimalwhere Decimal: CheckedAdd<i64>,

§

type Output = <Decimal as CheckedAdd<i64>>::Output

The resulting type after applying checked_add.
source§

fn checked_add(self, rhs: i64) -> <&'a Decimal as CheckedAdd<i64>>::Output

Returns Some(self + rhs) or None if the result can not be represented by the Output type.
source§

impl CheckedAdd<i64> for Decimal

§

type Output = Option<Decimal>

The resulting type after applying checked_add.
source§

fn checked_add(self, rhs: i64) -> <Decimal as CheckedAdd<i64>>::Output

Returns Some(self + rhs) or None if the result can not be represented by the Output type.
source§

impl<'a> CheckedAdd<i8> for &'a Decimalwhere Decimal: CheckedAdd<i8>,

§

type Output = <Decimal as CheckedAdd<i8>>::Output

The resulting type after applying checked_add.
source§

fn checked_add(self, rhs: i8) -> <&'a Decimal as CheckedAdd<i8>>::Output

Returns Some(self + rhs) or None if the result can not be represented by the Output type.
source§

impl CheckedAdd<i8> for Decimal

§

type Output = Option<Decimal>

The resulting type after applying checked_add.
source§

fn checked_add(self, rhs: i8) -> <Decimal as CheckedAdd<i8>>::Output

Returns Some(self + rhs) or None if the result can not be represented by the Output type.
source§

impl<'a> CheckedAdd<u16> for &'a Decimalwhere Decimal: CheckedAdd<u16>,

§

type Output = <Decimal as CheckedAdd<u16>>::Output

The resulting type after applying checked_add.
source§

fn checked_add(self, rhs: u16) -> <&'a Decimal as CheckedAdd<u16>>::Output

Returns Some(self + rhs) or None if the result can not be represented by the Output type.
source§

impl CheckedAdd<u16> for Decimal

§

type Output = Option<Decimal>

The resulting type after applying checked_add.
source§

fn checked_add(self, rhs: u16) -> <Decimal as CheckedAdd<u16>>::Output

Returns Some(self + rhs) or None if the result can not be represented by the Output type.
source§

impl<'a> CheckedAdd<u32> for &'a Decimalwhere Decimal: CheckedAdd<u32>,

§

type Output = <Decimal as CheckedAdd<u32>>::Output

The resulting type after applying checked_add.
source§

fn checked_add(self, rhs: u32) -> <&'a Decimal as CheckedAdd<u32>>::Output

Returns Some(self + rhs) or None if the result can not be represented by the Output type.
source§

impl CheckedAdd<u32> for Decimal

§

type Output = Option<Decimal>

The resulting type after applying checked_add.
source§

fn checked_add(self, rhs: u32) -> <Decimal as CheckedAdd<u32>>::Output

Returns Some(self + rhs) or None if the result can not be represented by the Output type.
source§

impl<'a> CheckedAdd<u64> for &'a Decimalwhere Decimal: CheckedAdd<u64>,

§

type Output = <Decimal as CheckedAdd<u64>>::Output

The resulting type after applying checked_add.
source§

fn checked_add(self, rhs: u64) -> <&'a Decimal as CheckedAdd<u64>>::Output

Returns Some(self + rhs) or None if the result can not be represented by the Output type.
source§

impl CheckedAdd<u64> for Decimal

§

type Output = Option<Decimal>

The resulting type after applying checked_add.
source§

fn checked_add(self, rhs: u64) -> <Decimal as CheckedAdd<u64>>::Output

Returns Some(self + rhs) or None if the result can not be represented by the Output type.
source§

impl<'a> CheckedAdd<u8> for &'a Decimalwhere Decimal: CheckedAdd<u8>,

§

type Output = <Decimal as CheckedAdd<u8>>::Output

The resulting type after applying checked_add.
source§

fn checked_add(self, rhs: u8) -> <&'a Decimal as CheckedAdd<u8>>::Output

Returns Some(self + rhs) or None if the result can not be represented by the Output type.
source§

impl CheckedAdd<u8> for Decimal

§

type Output = Option<Decimal>

The resulting type after applying checked_add.
source§

fn checked_add(self, rhs: u8) -> <Decimal as CheckedAdd<u8>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedDiv<Decimal>>::Output

The resulting type after applying checked_div.
source§

fn checked_div(self, rhs: &Decimal) -> <&Decimal as CheckedDiv<&Decimal>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedDiv<Decimal>>::Output

The resulting type after applying checked_div.
source§

fn checked_div(self, rhs: &Decimal) -> <Decimal as CheckedDiv<&Decimal>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedDiv<i128>>::Output

The resulting type after applying checked_div.
source§

fn checked_div(self, rhs: &i128) -> <&Decimal as CheckedDiv<&i128>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedDiv<i128>>::Output

The resulting type after applying checked_div.
source§

fn checked_div(self, rhs: &i128) -> <Decimal as CheckedDiv<&i128>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedDiv<i16>>::Output

The resulting type after applying checked_div.
source§

fn checked_div(self, rhs: &i16) -> <&Decimal as CheckedDiv<&i16>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedDiv<i16>>::Output

The resulting type after applying checked_div.
source§

fn checked_div(self, rhs: &i16) -> <Decimal as CheckedDiv<&i16>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedDiv<i32>>::Output

The resulting type after applying checked_div.
source§

fn checked_div(self, rhs: &i32) -> <&Decimal as CheckedDiv<&i32>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedDiv<i32>>::Output

The resulting type after applying checked_div.
source§

fn checked_div(self, rhs: &i32) -> <Decimal as CheckedDiv<&i32>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedDiv<i64>>::Output

The resulting type after applying checked_div.
source§

fn checked_div(self, rhs: &i64) -> <&Decimal as CheckedDiv<&i64>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedDiv<i64>>::Output

The resulting type after applying checked_div.
source§

fn checked_div(self, rhs: &i64) -> <Decimal as CheckedDiv<&i64>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedDiv<i8>>::Output

The resulting type after applying checked_div.
source§

fn checked_div(self, rhs: &i8) -> <&Decimal as CheckedDiv<&i8>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedDiv<i8>>::Output

The resulting type after applying checked_div.
source§

fn checked_div(self, rhs: &i8) -> <Decimal as CheckedDiv<&i8>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedDiv<u16>>::Output

The resulting type after applying checked_div.
source§

fn checked_div(self, rhs: &u16) -> <&Decimal as CheckedDiv<&u16>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedDiv<u16>>::Output

The resulting type after applying checked_div.
source§

fn checked_div(self, rhs: &u16) -> <Decimal as CheckedDiv<&u16>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedDiv<u32>>::Output

The resulting type after applying checked_div.
source§

fn checked_div(self, rhs: &u32) -> <&Decimal as CheckedDiv<&u32>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedDiv<u32>>::Output

The resulting type after applying checked_div.
source§

fn checked_div(self, rhs: &u32) -> <Decimal as CheckedDiv<&u32>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedDiv<u64>>::Output

The resulting type after applying checked_div.
source§

fn checked_div(self, rhs: &u64) -> <&Decimal as CheckedDiv<&u64>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedDiv<u64>>::Output

The resulting type after applying checked_div.
source§

fn checked_div(self, rhs: &u64) -> <Decimal as CheckedDiv<&u64>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedDiv<u8>>::Output

The resulting type after applying checked_div.
source§

fn checked_div(self, rhs: &u8) -> <&Decimal as CheckedDiv<&u8>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedDiv<u8>>::Output

The resulting type after applying checked_div.
source§

fn checked_div(self, rhs: &u8) -> <Decimal as CheckedDiv<&u8>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedDiv<Decimal>>::Output

The resulting type after applying checked_div.
source§

fn checked_div( self, rhs: Decimal ) -> <&'a Decimal as CheckedDiv<Decimal>>::Output

Returns Some(self / rhs) or None if the result can not be represented by the Output type.
source§

impl CheckedDiv<Decimal> for Decimal

§

type Output = Option<Decimal>

The resulting type after applying checked_div.
source§

fn checked_div(self, rhs: Decimal) -> <Decimal as CheckedDiv<Decimal>>::Output

Returns Some(self / rhs) or None if the result can not be represented by the Output type.
source§

impl<'a> CheckedDiv<i128> for &'a Decimalwhere Decimal: CheckedDiv<i128>,

§

type Output = <Decimal as CheckedDiv<i128>>::Output

The resulting type after applying checked_div.
source§

fn checked_div(self, rhs: i128) -> <&'a Decimal as CheckedDiv<i128>>::Output

Returns Some(self / rhs) or None if the result can not be represented by the Output type.
source§

impl CheckedDiv<i128> for Decimal

§

type Output = Option<Decimal>

The resulting type after applying checked_div.
source§

fn checked_div(self, rhs: i128) -> <Decimal as CheckedDiv<i128>>::Output

Returns Some(self / rhs) or None if the result can not be represented by the Output type.
source§

impl<'a> CheckedDiv<i16> for &'a Decimalwhere Decimal: CheckedDiv<i16>,

§

type Output = <Decimal as CheckedDiv<i16>>::Output

The resulting type after applying checked_div.
source§

fn checked_div(self, rhs: i16) -> <&'a Decimal as CheckedDiv<i16>>::Output

Returns Some(self / rhs) or None if the result can not be represented by the Output type.
source§

impl CheckedDiv<i16> for Decimal

§

type Output = Option<Decimal>

The resulting type after applying checked_div.
source§

fn checked_div(self, rhs: i16) -> <Decimal as CheckedDiv<i16>>::Output

Returns Some(self / rhs) or None if the result can not be represented by the Output type.
source§

impl<'a> CheckedDiv<i32> for &'a Decimalwhere Decimal: CheckedDiv<i32>,

§

type Output = <Decimal as CheckedDiv<i32>>::Output

The resulting type after applying checked_div.
source§

fn checked_div(self, rhs: i32) -> <&'a Decimal as CheckedDiv<i32>>::Output

Returns Some(self / rhs) or None if the result can not be represented by the Output type.
source§

impl CheckedDiv<i32> for Decimal

§

type Output = Option<Decimal>

The resulting type after applying checked_div.
source§

fn checked_div(self, rhs: i32) -> <Decimal as CheckedDiv<i32>>::Output

Returns Some(self / rhs) or None if the result can not be represented by the Output type.
source§

impl<'a> CheckedDiv<i64> for &'a Decimalwhere Decimal: CheckedDiv<i64>,

§

type Output = <Decimal as CheckedDiv<i64>>::Output

The resulting type after applying checked_div.
source§

fn checked_div(self, rhs: i64) -> <&'a Decimal as CheckedDiv<i64>>::Output

Returns Some(self / rhs) or None if the result can not be represented by the Output type.
source§

impl CheckedDiv<i64> for Decimal

§

type Output = Option<Decimal>

The resulting type after applying checked_div.
source§

fn checked_div(self, rhs: i64) -> <Decimal as CheckedDiv<i64>>::Output

Returns Some(self / rhs) or None if the result can not be represented by the Output type.
source§

impl<'a> CheckedDiv<i8> for &'a Decimalwhere Decimal: CheckedDiv<i8>,

§

type Output = <Decimal as CheckedDiv<i8>>::Output

The resulting type after applying checked_div.
source§

fn checked_div(self, rhs: i8) -> <&'a Decimal as CheckedDiv<i8>>::Output

Returns Some(self / rhs) or None if the result can not be represented by the Output type.
source§

impl CheckedDiv<i8> for Decimal

§

type Output = Option<Decimal>

The resulting type after applying checked_div.
source§

fn checked_div(self, rhs: i8) -> <Decimal as CheckedDiv<i8>>::Output

Returns Some(self / rhs) or None if the result can not be represented by the Output type.
source§

impl<'a> CheckedDiv<u16> for &'a Decimalwhere Decimal: CheckedDiv<u16>,

§

type Output = <Decimal as CheckedDiv<u16>>::Output

The resulting type after applying checked_div.
source§

fn checked_div(self, rhs: u16) -> <&'a Decimal as CheckedDiv<u16>>::Output

Returns Some(self / rhs) or None if the result can not be represented by the Output type.
source§

impl CheckedDiv<u16> for Decimal

§

type Output = Option<Decimal>

The resulting type after applying checked_div.
source§

fn checked_div(self, rhs: u16) -> <Decimal as CheckedDiv<u16>>::Output

Returns Some(self / rhs) or None if the result can not be represented by the Output type.
source§

impl<'a> CheckedDiv<u32> for &'a Decimalwhere Decimal: CheckedDiv<u32>,

§

type Output = <Decimal as CheckedDiv<u32>>::Output

The resulting type after applying checked_div.
source§

fn checked_div(self, rhs: u32) -> <&'a Decimal as CheckedDiv<u32>>::Output

Returns Some(self / rhs) or None if the result can not be represented by the Output type.
source§

impl CheckedDiv<u32> for Decimal

§

type Output = Option<Decimal>

The resulting type after applying checked_div.
source§

fn checked_div(self, rhs: u32) -> <Decimal as CheckedDiv<u32>>::Output

Returns Some(self / rhs) or None if the result can not be represented by the Output type.
source§

impl<'a> CheckedDiv<u64> for &'a Decimalwhere Decimal: CheckedDiv<u64>,

§

type Output = <Decimal as CheckedDiv<u64>>::Output

The resulting type after applying checked_div.
source§

fn checked_div(self, rhs: u64) -> <&'a Decimal as CheckedDiv<u64>>::Output

Returns Some(self / rhs) or None if the result can not be represented by the Output type.
source§

impl CheckedDiv<u64> for Decimal

§

type Output = Option<Decimal>

The resulting type after applying checked_div.
source§

fn checked_div(self, rhs: u64) -> <Decimal as CheckedDiv<u64>>::Output

Returns Some(self / rhs) or None if the result can not be represented by the Output type.
source§

impl<'a> CheckedDiv<u8> for &'a Decimalwhere Decimal: CheckedDiv<u8>,

§

type Output = <Decimal as CheckedDiv<u8>>::Output

The resulting type after applying checked_div.
source§

fn checked_div(self, rhs: u8) -> <&'a Decimal as CheckedDiv<u8>>::Output

Returns Some(self / rhs) or None if the result can not be represented by the Output type.
source§

impl CheckedDiv<u8> for Decimal

§

type Output = Option<Decimal>

The resulting type after applying checked_div.
source§

fn checked_div(self, rhs: u8) -> <Decimal as CheckedDiv<u8>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedMul<Decimal>>::Output

The resulting type after applying checked_mul.
source§

fn checked_mul(self, rhs: &Decimal) -> <&Decimal as CheckedMul<&Decimal>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedMul<Decimal>>::Output

The resulting type after applying checked_mul.
source§

fn checked_mul(self, rhs: &Decimal) -> <Decimal as CheckedMul<&Decimal>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedMul<i128>>::Output

The resulting type after applying checked_mul.
source§

fn checked_mul(self, rhs: &i128) -> <&Decimal as CheckedMul<&i128>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedMul<i128>>::Output

The resulting type after applying checked_mul.
source§

fn checked_mul(self, rhs: &i128) -> <Decimal as CheckedMul<&i128>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedMul<i16>>::Output

The resulting type after applying checked_mul.
source§

fn checked_mul(self, rhs: &i16) -> <&Decimal as CheckedMul<&i16>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedMul<i16>>::Output

The resulting type after applying checked_mul.
source§

fn checked_mul(self, rhs: &i16) -> <Decimal as CheckedMul<&i16>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedMul<i32>>::Output

The resulting type after applying checked_mul.
source§

fn checked_mul(self, rhs: &i32) -> <&Decimal as CheckedMul<&i32>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedMul<i32>>::Output

The resulting type after applying checked_mul.
source§

fn checked_mul(self, rhs: &i32) -> <Decimal as CheckedMul<&i32>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedMul<i64>>::Output

The resulting type after applying checked_mul.
source§

fn checked_mul(self, rhs: &i64) -> <&Decimal as CheckedMul<&i64>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedMul<i64>>::Output

The resulting type after applying checked_mul.
source§

fn checked_mul(self, rhs: &i64) -> <Decimal as CheckedMul<&i64>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedMul<i8>>::Output

The resulting type after applying checked_mul.
source§

fn checked_mul(self, rhs: &i8) -> <&Decimal as CheckedMul<&i8>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedMul<i8>>::Output

The resulting type after applying checked_mul.
source§

fn checked_mul(self, rhs: &i8) -> <Decimal as CheckedMul<&i8>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedMul<u16>>::Output

The resulting type after applying checked_mul.
source§

fn checked_mul(self, rhs: &u16) -> <&Decimal as CheckedMul<&u16>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedMul<u16>>::Output

The resulting type after applying checked_mul.
source§

fn checked_mul(self, rhs: &u16) -> <Decimal as CheckedMul<&u16>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedMul<u32>>::Output

The resulting type after applying checked_mul.
source§

fn checked_mul(self, rhs: &u32) -> <&Decimal as CheckedMul<&u32>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedMul<u32>>::Output

The resulting type after applying checked_mul.
source§

fn checked_mul(self, rhs: &u32) -> <Decimal as CheckedMul<&u32>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedMul<u64>>::Output

The resulting type after applying checked_mul.
source§

fn checked_mul(self, rhs: &u64) -> <&Decimal as CheckedMul<&u64>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedMul<u64>>::Output

The resulting type after applying checked_mul.
source§

fn checked_mul(self, rhs: &u64) -> <Decimal as CheckedMul<&u64>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedMul<u8>>::Output

The resulting type after applying checked_mul.
source§

fn checked_mul(self, rhs: &u8) -> <&Decimal as CheckedMul<&u8>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedMul<u8>>::Output

The resulting type after applying checked_mul.
source§

fn checked_mul(self, rhs: &u8) -> <Decimal as CheckedMul<&u8>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedMul<Decimal>>::Output

The resulting type after applying checked_mul.
source§

fn checked_mul( self, rhs: Decimal ) -> <&'a Decimal as CheckedMul<Decimal>>::Output

Returns Some(self * rhs) or None if the result can not be represented by the Output type.
source§

impl CheckedMul<Decimal> for Decimal

§

type Output = Option<Decimal>

The resulting type after applying checked_mul.
source§

fn checked_mul(self, rhs: Decimal) -> <Decimal as CheckedMul<Decimal>>::Output

Returns Some(self * rhs) or None if the result can not be represented by the Output type.
source§

impl<'a> CheckedMul<i128> for &'a Decimalwhere Decimal: CheckedMul<i128>,

§

type Output = <Decimal as CheckedMul<i128>>::Output

The resulting type after applying checked_mul.
source§

fn checked_mul(self, rhs: i128) -> <&'a Decimal as CheckedMul<i128>>::Output

Returns Some(self * rhs) or None if the result can not be represented by the Output type.
source§

impl CheckedMul<i128> for Decimal

§

type Output = Option<Decimal>

The resulting type after applying checked_mul.
source§

fn checked_mul(self, rhs: i128) -> <Decimal as CheckedMul<i128>>::Output

Returns Some(self * rhs) or None if the result can not be represented by the Output type.
source§

impl<'a> CheckedMul<i16> for &'a Decimalwhere Decimal: CheckedMul<i16>,

§

type Output = <Decimal as CheckedMul<i16>>::Output

The resulting type after applying checked_mul.
source§

fn checked_mul(self, rhs: i16) -> <&'a Decimal as CheckedMul<i16>>::Output

Returns Some(self * rhs) or None if the result can not be represented by the Output type.
source§

impl CheckedMul<i16> for Decimal

§

type Output = Option<Decimal>

The resulting type after applying checked_mul.
source§

fn checked_mul(self, rhs: i16) -> <Decimal as CheckedMul<i16>>::Output

Returns Some(self * rhs) or None if the result can not be represented by the Output type.
source§

impl<'a> CheckedMul<i32> for &'a Decimalwhere Decimal: CheckedMul<i32>,

§

type Output = <Decimal as CheckedMul<i32>>::Output

The resulting type after applying checked_mul.
source§

fn checked_mul(self, rhs: i32) -> <&'a Decimal as CheckedMul<i32>>::Output

Returns Some(self * rhs) or None if the result can not be represented by the Output type.
source§

impl CheckedMul<i32> for Decimal

§

type Output = Option<Decimal>

The resulting type after applying checked_mul.
source§

fn checked_mul(self, rhs: i32) -> <Decimal as CheckedMul<i32>>::Output

Returns Some(self * rhs) or None if the result can not be represented by the Output type.
source§

impl<'a> CheckedMul<i64> for &'a Decimalwhere Decimal: CheckedMul<i64>,

§

type Output = <Decimal as CheckedMul<i64>>::Output

The resulting type after applying checked_mul.
source§

fn checked_mul(self, rhs: i64) -> <&'a Decimal as CheckedMul<i64>>::Output

Returns Some(self * rhs) or None if the result can not be represented by the Output type.
source§

impl CheckedMul<i64> for Decimal

§

type Output = Option<Decimal>

The resulting type after applying checked_mul.
source§

fn checked_mul(self, rhs: i64) -> <Decimal as CheckedMul<i64>>::Output

Returns Some(self * rhs) or None if the result can not be represented by the Output type.
source§

impl<'a> CheckedMul<i8> for &'a Decimalwhere Decimal: CheckedMul<i8>,

§

type Output = <Decimal as CheckedMul<i8>>::Output

The resulting type after applying checked_mul.
source§

fn checked_mul(self, rhs: i8) -> <&'a Decimal as CheckedMul<i8>>::Output

Returns Some(self * rhs) or None if the result can not be represented by the Output type.
source§

impl CheckedMul<i8> for Decimal

§

type Output = Option<Decimal>

The resulting type after applying checked_mul.
source§

fn checked_mul(self, rhs: i8) -> <Decimal as CheckedMul<i8>>::Output

Returns Some(self * rhs) or None if the result can not be represented by the Output type.
source§

impl<'a> CheckedMul<u16> for &'a Decimalwhere Decimal: CheckedMul<u16>,

§

type Output = <Decimal as CheckedMul<u16>>::Output

The resulting type after applying checked_mul.
source§

fn checked_mul(self, rhs: u16) -> <&'a Decimal as CheckedMul<u16>>::Output

Returns Some(self * rhs) or None if the result can not be represented by the Output type.
source§

impl CheckedMul<u16> for Decimal

§

type Output = Option<Decimal>

The resulting type after applying checked_mul.
source§

fn checked_mul(self, rhs: u16) -> <Decimal as CheckedMul<u16>>::Output

Returns Some(self * rhs) or None if the result can not be represented by the Output type.
source§

impl<'a> CheckedMul<u32> for &'a Decimalwhere Decimal: CheckedMul<u32>,

§

type Output = <Decimal as CheckedMul<u32>>::Output

The resulting type after applying checked_mul.
source§

fn checked_mul(self, rhs: u32) -> <&'a Decimal as CheckedMul<u32>>::Output

Returns Some(self * rhs) or None if the result can not be represented by the Output type.
source§

impl CheckedMul<u32> for Decimal

§

type Output = Option<Decimal>

The resulting type after applying checked_mul.
source§

fn checked_mul(self, rhs: u32) -> <Decimal as CheckedMul<u32>>::Output

Returns Some(self * rhs) or None if the result can not be represented by the Output type.
source§

impl<'a> CheckedMul<u64> for &'a Decimalwhere Decimal: CheckedMul<u64>,

§

type Output = <Decimal as CheckedMul<u64>>::Output

The resulting type after applying checked_mul.
source§

fn checked_mul(self, rhs: u64) -> <&'a Decimal as CheckedMul<u64>>::Output

Returns Some(self * rhs) or None if the result can not be represented by the Output type.
source§

impl CheckedMul<u64> for Decimal

§

type Output = Option<Decimal>

The resulting type after applying checked_mul.
source§

fn checked_mul(self, rhs: u64) -> <Decimal as CheckedMul<u64>>::Output

Returns Some(self * rhs) or None if the result can not be represented by the Output type.
source§

impl<'a> CheckedMul<u8> for &'a Decimalwhere Decimal: CheckedMul<u8>,

§

type Output = <Decimal as CheckedMul<u8>>::Output

The resulting type after applying checked_mul.
source§

fn checked_mul(self, rhs: u8) -> <&'a Decimal as CheckedMul<u8>>::Output

Returns Some(self * rhs) or None if the result can not be represented by the Output type.
source§

impl CheckedMul<u8> for Decimal

§

type Output = Option<Decimal>

The resulting type after applying checked_mul.
source§

fn checked_mul(self, rhs: u8) -> <Decimal as CheckedMul<u8>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedRem<Decimal>>::Output

The resulting type after applying checked_rem.
source§

fn checked_rem(self, rhs: &Decimal) -> <&Decimal as CheckedRem<&Decimal>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedRem<Decimal>>::Output

The resulting type after applying checked_rem.
source§

fn checked_rem(self, rhs: &Decimal) -> <Decimal as CheckedRem<&Decimal>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedRem<i128>>::Output

The resulting type after applying checked_rem.
source§

fn checked_rem(self, rhs: &i128) -> <&Decimal as CheckedRem<&i128>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedRem<i128>>::Output

The resulting type after applying checked_rem.
source§

fn checked_rem(self, rhs: &i128) -> <Decimal as CheckedRem<&i128>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedRem<i16>>::Output

The resulting type after applying checked_rem.
source§

fn checked_rem(self, rhs: &i16) -> <&Decimal as CheckedRem<&i16>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedRem<i16>>::Output

The resulting type after applying checked_rem.
source§

fn checked_rem(self, rhs: &i16) -> <Decimal as CheckedRem<&i16>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedRem<i32>>::Output

The resulting type after applying checked_rem.
source§

fn checked_rem(self, rhs: &i32) -> <&Decimal as CheckedRem<&i32>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedRem<i32>>::Output

The resulting type after applying checked_rem.
source§

fn checked_rem(self, rhs: &i32) -> <Decimal as CheckedRem<&i32>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedRem<i64>>::Output

The resulting type after applying checked_rem.
source§

fn checked_rem(self, rhs: &i64) -> <&Decimal as CheckedRem<&i64>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedRem<i64>>::Output

The resulting type after applying checked_rem.
source§

fn checked_rem(self, rhs: &i64) -> <Decimal as CheckedRem<&i64>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedRem<i8>>::Output

The resulting type after applying checked_rem.
source§

fn checked_rem(self, rhs: &i8) -> <&Decimal as CheckedRem<&i8>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedRem<i8>>::Output

The resulting type after applying checked_rem.
source§

fn checked_rem(self, rhs: &i8) -> <Decimal as CheckedRem<&i8>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedRem<u16>>::Output

The resulting type after applying checked_rem.
source§

fn checked_rem(self, rhs: &u16) -> <&Decimal as CheckedRem<&u16>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedRem<u16>>::Output

The resulting type after applying checked_rem.
source§

fn checked_rem(self, rhs: &u16) -> <Decimal as CheckedRem<&u16>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedRem<u32>>::Output

The resulting type after applying checked_rem.
source§

fn checked_rem(self, rhs: &u32) -> <&Decimal as CheckedRem<&u32>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedRem<u32>>::Output

The resulting type after applying checked_rem.
source§

fn checked_rem(self, rhs: &u32) -> <Decimal as CheckedRem<&u32>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedRem<u64>>::Output

The resulting type after applying checked_rem.
source§

fn checked_rem(self, rhs: &u64) -> <&Decimal as CheckedRem<&u64>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedRem<u64>>::Output

The resulting type after applying checked_rem.
source§

fn checked_rem(self, rhs: &u64) -> <Decimal as CheckedRem<&u64>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedRem<u8>>::Output

The resulting type after applying checked_rem.
source§

fn checked_rem(self, rhs: &u8) -> <&Decimal as CheckedRem<&u8>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedRem<u8>>::Output

The resulting type after applying checked_rem.
source§

fn checked_rem(self, rhs: &u8) -> <Decimal as CheckedRem<&u8>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedRem<Decimal>>::Output

The resulting type after applying checked_rem.
source§

fn checked_rem( self, rhs: Decimal ) -> <&'a Decimal as CheckedRem<Decimal>>::Output

Returns Some(self % rhs) or None if the result can not be represented by the Output type.
source§

impl CheckedRem<Decimal> for Decimal

§

type Output = Option<Decimal>

The resulting type after applying checked_rem.
source§

fn checked_rem(self, rhs: Decimal) -> <Decimal as CheckedRem<Decimal>>::Output

Returns Some(self % rhs) or None if the result can not be represented by the Output type.
source§

impl<'a> CheckedRem<i128> for &'a Decimalwhere Decimal: CheckedRem<i128>,

§

type Output = <Decimal as CheckedRem<i128>>::Output

The resulting type after applying checked_rem.
source§

fn checked_rem(self, rhs: i128) -> <&'a Decimal as CheckedRem<i128>>::Output

Returns Some(self % rhs) or None if the result can not be represented by the Output type.
source§

impl CheckedRem<i128> for Decimal

§

type Output = Option<Decimal>

The resulting type after applying checked_rem.
source§

fn checked_rem(self, rhs: i128) -> <Decimal as CheckedRem<i128>>::Output

Returns Some(self % rhs) or None if the result can not be represented by the Output type.
source§

impl<'a> CheckedRem<i16> for &'a Decimalwhere Decimal: CheckedRem<i16>,

§

type Output = <Decimal as CheckedRem<i16>>::Output

The resulting type after applying checked_rem.
source§

fn checked_rem(self, rhs: i16) -> <&'a Decimal as CheckedRem<i16>>::Output

Returns Some(self % rhs) or None if the result can not be represented by the Output type.
source§

impl CheckedRem<i16> for Decimal

§

type Output = Option<Decimal>

The resulting type after applying checked_rem.
source§

fn checked_rem(self, rhs: i16) -> <Decimal as CheckedRem<i16>>::Output

Returns Some(self % rhs) or None if the result can not be represented by the Output type.
source§

impl<'a> CheckedRem<i32> for &'a Decimalwhere Decimal: CheckedRem<i32>,

§

type Output = <Decimal as CheckedRem<i32>>::Output

The resulting type after applying checked_rem.
source§

fn checked_rem(self, rhs: i32) -> <&'a Decimal as CheckedRem<i32>>::Output

Returns Some(self % rhs) or None if the result can not be represented by the Output type.
source§

impl CheckedRem<i32> for Decimal

§

type Output = Option<Decimal>

The resulting type after applying checked_rem.
source§

fn checked_rem(self, rhs: i32) -> <Decimal as CheckedRem<i32>>::Output

Returns Some(self % rhs) or None if the result can not be represented by the Output type.
source§

impl<'a> CheckedRem<i64> for &'a Decimalwhere Decimal: CheckedRem<i64>,

§

type Output = <Decimal as CheckedRem<i64>>::Output

The resulting type after applying checked_rem.
source§

fn checked_rem(self, rhs: i64) -> <&'a Decimal as CheckedRem<i64>>::Output

Returns Some(self % rhs) or None if the result can not be represented by the Output type.
source§

impl CheckedRem<i64> for Decimal

§

type Output = Option<Decimal>

The resulting type after applying checked_rem.
source§

fn checked_rem(self, rhs: i64) -> <Decimal as CheckedRem<i64>>::Output

Returns Some(self % rhs) or None if the result can not be represented by the Output type.
source§

impl<'a> CheckedRem<i8> for &'a Decimalwhere Decimal: CheckedRem<i8>,

§

type Output = <Decimal as CheckedRem<i8>>::Output

The resulting type after applying checked_rem.
source§

fn checked_rem(self, rhs: i8) -> <&'a Decimal as CheckedRem<i8>>::Output

Returns Some(self % rhs) or None if the result can not be represented by the Output type.
source§

impl CheckedRem<i8> for Decimal

§

type Output = Option<Decimal>

The resulting type after applying checked_rem.
source§

fn checked_rem(self, rhs: i8) -> <Decimal as CheckedRem<i8>>::Output

Returns Some(self % rhs) or None if the result can not be represented by the Output type.
source§

impl<'a> CheckedRem<u16> for &'a Decimalwhere Decimal: CheckedRem<u16>,

§

type Output = <Decimal as CheckedRem<u16>>::Output

The resulting type after applying checked_rem.
source§

fn checked_rem(self, rhs: u16) -> <&'a Decimal as CheckedRem<u16>>::Output

Returns Some(self % rhs) or None if the result can not be represented by the Output type.
source§

impl CheckedRem<u16> for Decimal

§

type Output = Option<Decimal>

The resulting type after applying checked_rem.
source§

fn checked_rem(self, rhs: u16) -> <Decimal as CheckedRem<u16>>::Output

Returns Some(self % rhs) or None if the result can not be represented by the Output type.
source§

impl<'a> CheckedRem<u32> for &'a Decimalwhere Decimal: CheckedRem<u32>,

§

type Output = <Decimal as CheckedRem<u32>>::Output

The resulting type after applying checked_rem.
source§

fn checked_rem(self, rhs: u32) -> <&'a Decimal as CheckedRem<u32>>::Output

Returns Some(self % rhs) or None if the result can not be represented by the Output type.
source§

impl CheckedRem<u32> for Decimal

§

type Output = Option<Decimal>

The resulting type after applying checked_rem.
source§

fn checked_rem(self, rhs: u32) -> <Decimal as CheckedRem<u32>>::Output

Returns Some(self % rhs) or None if the result can not be represented by the Output type.
source§

impl<'a> CheckedRem<u64> for &'a Decimalwhere Decimal: CheckedRem<u64>,

§

type Output = <Decimal as CheckedRem<u64>>::Output

The resulting type after applying checked_rem.
source§

fn checked_rem(self, rhs: u64) -> <&'a Decimal as CheckedRem<u64>>::Output

Returns Some(self % rhs) or None if the result can not be represented by the Output type.
source§

impl CheckedRem<u64> for Decimal

§

type Output = Option<Decimal>

The resulting type after applying checked_rem.
source§

fn checked_rem(self, rhs: u64) -> <Decimal as CheckedRem<u64>>::Output

Returns Some(self % rhs) or None if the result can not be represented by the Output type.
source§

impl<'a> CheckedRem<u8> for &'a Decimalwhere Decimal: CheckedRem<u8>,

§

type Output = <Decimal as CheckedRem<u8>>::Output

The resulting type after applying checked_rem.
source§

fn checked_rem(self, rhs: u8) -> <&'a Decimal as CheckedRem<u8>>::Output

Returns Some(self % rhs) or None if the result can not be represented by the Output type.
source§

impl CheckedRem<u8> for Decimal

§

type Output = Option<Decimal>

The resulting type after applying checked_rem.
source§

fn checked_rem(self, rhs: u8) -> <Decimal as CheckedRem<u8>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedSub<Decimal>>::Output

The resulting type after applying checked_sub.
source§

fn checked_sub(self, rhs: &Decimal) -> <&Decimal as CheckedSub<&Decimal>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedSub<Decimal>>::Output

The resulting type after applying checked_sub.
source§

fn checked_sub(self, rhs: &Decimal) -> <Decimal as CheckedSub<&Decimal>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedSub<i128>>::Output

The resulting type after applying checked_sub.
source§

fn checked_sub(self, rhs: &i128) -> <&Decimal as CheckedSub<&i128>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedSub<i128>>::Output

The resulting type after applying checked_sub.
source§

fn checked_sub(self, rhs: &i128) -> <Decimal as CheckedSub<&i128>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedSub<i16>>::Output

The resulting type after applying checked_sub.
source§

fn checked_sub(self, rhs: &i16) -> <&Decimal as CheckedSub<&i16>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedSub<i16>>::Output

The resulting type after applying checked_sub.
source§

fn checked_sub(self, rhs: &i16) -> <Decimal as CheckedSub<&i16>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedSub<i32>>::Output

The resulting type after applying checked_sub.
source§

fn checked_sub(self, rhs: &i32) -> <&Decimal as CheckedSub<&i32>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedSub<i32>>::Output

The resulting type after applying checked_sub.
source§

fn checked_sub(self, rhs: &i32) -> <Decimal as CheckedSub<&i32>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedSub<i64>>::Output

The resulting type after applying checked_sub.
source§

fn checked_sub(self, rhs: &i64) -> <&Decimal as CheckedSub<&i64>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedSub<i64>>::Output

The resulting type after applying checked_sub.
source§

fn checked_sub(self, rhs: &i64) -> <Decimal as CheckedSub<&i64>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedSub<i8>>::Output

The resulting type after applying checked_sub.
source§

fn checked_sub(self, rhs: &i8) -> <&Decimal as CheckedSub<&i8>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedSub<i8>>::Output

The resulting type after applying checked_sub.
source§

fn checked_sub(self, rhs: &i8) -> <Decimal as CheckedSub<&i8>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedSub<u16>>::Output

The resulting type after applying checked_sub.
source§

fn checked_sub(self, rhs: &u16) -> <&Decimal as CheckedSub<&u16>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedSub<u16>>::Output

The resulting type after applying checked_sub.
source§

fn checked_sub(self, rhs: &u16) -> <Decimal as CheckedSub<&u16>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedSub<u32>>::Output

The resulting type after applying checked_sub.
source§

fn checked_sub(self, rhs: &u32) -> <&Decimal as CheckedSub<&u32>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedSub<u32>>::Output

The resulting type after applying checked_sub.
source§

fn checked_sub(self, rhs: &u32) -> <Decimal as CheckedSub<&u32>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedSub<u64>>::Output

The resulting type after applying checked_sub.
source§

fn checked_sub(self, rhs: &u64) -> <&Decimal as CheckedSub<&u64>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedSub<u64>>::Output

The resulting type after applying checked_sub.
source§

fn checked_sub(self, rhs: &u64) -> <Decimal as CheckedSub<&u64>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedSub<u8>>::Output

The resulting type after applying checked_sub.
source§

fn checked_sub(self, rhs: &u8) -> <&Decimal as CheckedSub<&u8>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedSub<u8>>::Output

The resulting type after applying checked_sub.
source§

fn checked_sub(self, rhs: &u8) -> <Decimal as CheckedSub<&u8>>::Output

Returns 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>,

§

type Output = <Decimal as CheckedSub<Decimal>>::Output

The resulting type after applying checked_sub.
source§

fn checked_sub( self, rhs: Decimal ) -> <&'a Decimal as CheckedSub<Decimal>>::Output

Returns Some(self - rhs) or None if the result can not be represented by the Output type.
source§

impl CheckedSub<Decimal> for Decimal

§

type Output = Option<Decimal>

The resulting type after applying checked_sub.
source§

fn checked_sub(self, rhs: Decimal) -> <Decimal as CheckedSub<Decimal>>::Output

Returns Some(self - rhs) or None if the result can not be represented by the Output type.
source§

impl<'a> CheckedSub<i128> for &'a Decimalwhere Decimal: CheckedSub<i128>,

§

type Output = <Decimal as CheckedSub<i128>>::Output

The resulting type after applying checked_sub.
source§

fn checked_sub(self, rhs: i128) -> <&'a Decimal as CheckedSub<i128>>::Output

Returns Some(self - rhs) or None if the result can not be represented by the Output type.
source§

impl CheckedSub<i128> for Decimal

§

type Output = Option<Decimal>

The resulting type after applying checked_sub.
source§

fn checked_sub(self, rhs: i128) -> <Decimal as CheckedSub<i128>>::Output

Returns Some(self - rhs) or None if the result can not be represented by the Output type.
source§

impl<'a> CheckedSub<i16> for &'a Decimalwhere Decimal: CheckedSub<i16>,

§

type Output = <Decimal as CheckedSub<i16>>::Output

The resulting type after applying checked_sub.
source§

fn checked_sub(self, rhs: i16) -> <&'a Decimal as CheckedSub<i16>>::Output

Returns Some(self - rhs) or None if the result can not be represented by the Output type.
source§

impl CheckedSub<i16> for Decimal

§

type Output = Option<Decimal>

The resulting type after applying checked_sub.
source§

fn checked_sub(self, rhs: i16) -> <Decimal as CheckedSub<i16>>::Output

Returns Some(self - rhs) or None if the result can not be represented by the Output type.
source§

impl<'a> CheckedSub<i32> for &'a Decimalwhere Decimal: CheckedSub<i32>,

§

type Output = <Decimal as CheckedSub<i32>>::Output

The resulting type after applying checked_sub.
source§

fn checked_sub(self, rhs: i32) -> <&'a Decimal as CheckedSub<i32>>::Output

Returns Some(self - rhs) or None if the result can not be represented by the Output type.
source§

impl CheckedSub<i32> for Decimal

§

type Output = Option<Decimal>

The resulting type after applying checked_sub.
source§

fn checked_sub(self, rhs: i32) -> <Decimal as CheckedSub<i32>>::Output

Returns Some(self - rhs) or None if the result can not be represented by the Output type.
source§

impl<'a> CheckedSub<i64> for &'a Decimalwhere Decimal: CheckedSub<i64>,

§

type Output = <Decimal as CheckedSub<i64>>::Output

The resulting type after applying checked_sub.
source§

fn checked_sub(self, rhs: i64) -> <&'a Decimal as CheckedSub<i64>>::Output

Returns Some(self - rhs) or None if the result can not be represented by the Output type.
source§

impl CheckedSub<i64> for Decimal

§

type Output = Option<Decimal>

The resulting type after applying checked_sub.
source§

fn checked_sub(self, rhs: i64) -> <Decimal as CheckedSub<i64>>::Output

Returns Some(self - rhs) or None if the result can not be represented by the Output type.
source§

impl<'a> CheckedSub<i8> for &'a Decimalwhere Decimal: CheckedSub<i8>,

§

type Output = <Decimal as CheckedSub<i8>>::Output

The resulting type after applying checked_sub.
source§

fn checked_sub(self, rhs: i8) -> <&'a Decimal as CheckedSub<i8>>::Output

Returns Some(self - rhs) or None if the result can not be represented by the Output type.
source§

impl CheckedSub<i8> for Decimal

§

type Output = Option<Decimal>

The resulting type after applying checked_sub.
source§

fn checked_sub(self, rhs: i8) -> <Decimal as CheckedSub<i8>>::Output

Returns Some(self - rhs) or None if the result can not be represented by the Output type.
source§

impl<'a> CheckedSub<u16> for &'a Decimalwhere Decimal: CheckedSub<u16>,

§

type Output = <Decimal as CheckedSub<u16>>::Output

The resulting type after applying checked_sub.
source§

fn checked_sub(self, rhs: u16) -> <&'a Decimal as CheckedSub<u16>>::Output

Returns Some(self - rhs) or None if the result can not be represented by the Output type.
source§

impl CheckedSub<u16> for Decimal

§

type Output = Option<Decimal>

The resulting type after applying checked_sub.
source§

fn checked_sub(self, rhs: u16) -> <Decimal as CheckedSub<u16>>::Output

Returns Some(self - rhs) or None if the result can not be represented by the Output type.
source§

impl<'a> CheckedSub<u32> for &'a Decimalwhere Decimal: CheckedSub<u32>,

§

type Output = <Decimal as CheckedSub<u32>>::Output

The resulting type after applying checked_sub.
source§

fn checked_sub(self, rhs: u32) -> <&'a Decimal as CheckedSub<u32>>::Output

Returns Some(self - rhs) or None if the result can not be represented by the Output type.
source§

impl CheckedSub<u32> for Decimal

§

type Output = Option<Decimal>

The resulting type after applying checked_sub.
source§

fn checked_sub(self, rhs: u32) -> <Decimal as CheckedSub<u32>>::Output

Returns Some(self - rhs) or None if the result can not be represented by the Output type.
source§

impl<'a> CheckedSub<u64> for &'a Decimalwhere Decimal: CheckedSub<u64>,

§

type Output = <Decimal as CheckedSub<u64>>::Output

The resulting type after applying checked_sub.
source§

fn checked_sub(self, rhs: u64) -> <&'a Decimal as CheckedSub<u64>>::Output

Returns Some(self - rhs) or None if the result can not be represented by the Output type.
source§

impl CheckedSub<u64> for Decimal

§

type Output = Option<Decimal>

The resulting type after applying checked_sub.
source§

fn checked_sub(self, rhs: u64) -> <Decimal as CheckedSub<u64>>::Output

Returns Some(self - rhs) or None if the result can not be represented by the Output type.
source§

impl<'a> CheckedSub<u8> for &'a Decimalwhere Decimal: CheckedSub<u8>,

§

type Output = <Decimal as CheckedSub<u8>>::Output

The resulting type after applying checked_sub.
source§

fn checked_sub(self, rhs: u8) -> <&'a Decimal as CheckedSub<u8>>::Output

Returns Some(self - rhs) or None if the result can not be represented by the Output type.
source§

impl CheckedSub<u8> for Decimal

§

type Output = Option<Decimal>

The resulting type after applying checked_sub.
source§

fn checked_sub(self, rhs: u8) -> <Decimal as CheckedSub<u8>>::Output

Returns Some(self - rhs) or None if the result can not be represented by the Output type.
source§

impl Clone for Decimal

source§

fn clone(&self) -> Decimal

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Decimal

source§

fn fmt(&self, form: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Default for Decimal

source§

fn default() -> Decimal

Default value: Decimal::ZERO

source§

impl Display for Decimal

source§

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 &Decimalwhere Decimal: Div<Decimal>,

§

type Output = <Decimal as Div<Decimal>>::Output

The resulting type after applying the / operator.
source§

fn div(self, rhs: &Decimal) -> <&Decimal as Div<&Decimal>>::Output

Performs the / operation. Read more
source§

impl Div<&Decimal> for Decimalwhere Decimal: Div<Decimal>,

§

type Output = <Decimal as Div<Decimal>>::Output

The resulting type after applying the / operator.
source§

fn div(self, rhs: &Decimal) -> <Decimal as Div<&Decimal>>::Output

Performs the / operation. Read more
source§

impl Div<&i128> for &Decimalwhere Decimal: Div<i128>,

§

type Output = <Decimal as Div<i128>>::Output

The resulting type after applying the / operator.
source§

fn div(self, rhs: &i128) -> <&Decimal as Div<&i128>>::Output

Performs the / operation. Read more
source§

impl Div<&i128> for Decimalwhere Decimal: Div<i128>,

§

type Output = <Decimal as Div<i128>>::Output

The resulting type after applying the / operator.
source§

fn div(self, rhs: &i128) -> <Decimal as Div<&i128>>::Output

Performs the / operation. Read more
source§

impl Div<&i16> for &Decimalwhere Decimal: Div<i16>,

§

type Output = <Decimal as Div<i16>>::Output

The resulting type after applying the / operator.
source§

fn div(self, rhs: &i16) -> <&Decimal as Div<&i16>>::Output

Performs the / operation. Read more
source§

impl Div<&i16> for Decimalwhere Decimal: Div<i16>,

§

type Output = <Decimal as Div<i16>>::Output

The resulting type after applying the / operator.
source§

fn div(self, rhs: &i16) -> <Decimal as Div<&i16>>::Output

Performs the / operation. Read more
source§

impl Div<&i32> for &Decimalwhere Decimal: Div<i32>,

§

type Output = <Decimal as Div<i32>>::Output

The resulting type after applying the / operator.
source§

fn div(self, rhs: &i32) -> <&Decimal as Div<&i32>>::Output

Performs the / operation. Read more
source§

impl Div<&i32> for Decimalwhere Decimal: Div<i32>,

§

type Output = <Decimal as Div<i32>>::Output

The resulting type after applying the / operator.
source§

fn div(self, rhs: &i32) -> <Decimal as Div<&i32>>::Output

Performs the / operation. Read more
source§

impl Div<&i64> for &Decimalwhere Decimal: Div<i64>,

§

type Output = <Decimal as Div<i64>>::Output

The resulting type after applying the / operator.
source§

fn div(self, rhs: &i64) -> <&Decimal as Div<&i64>>::Output

Performs the / operation. Read more
source§

impl Div<&i64> for Decimalwhere Decimal: Div<i64>,

§

type Output = <Decimal as Div<i64>>::Output

The resulting type after applying the / operator.
source§

fn div(self, rhs: &i64) -> <Decimal as Div<&i64>>::Output

Performs the / operation. Read more
source§

impl Div<&i8> for &Decimalwhere Decimal: Div<i8>,

§

type Output = <Decimal as Div<i8>>::Output

The resulting type after applying the / operator.
source§

fn div(self, rhs: &i8) -> <&Decimal as Div<&i8>>::Output

Performs the / operation. Read more
source§

impl Div<&i8> for Decimalwhere Decimal: Div<i8>,

§

type Output = <Decimal as Div<i8>>::Output

The resulting type after applying the / operator.
source§

fn div(self, rhs: &i8) -> <Decimal as Div<&i8>>::Output

Performs the / operation. Read more
source§

impl Div<&u16> for &Decimalwhere Decimal: Div<u16>,

§

type Output = <Decimal as Div<u16>>::Output

The resulting type after applying the / operator.
source§

fn div(self, rhs: &u16) -> <&Decimal as Div<&u16>>::Output

Performs the / operation. Read more
source§

impl Div<&u16> for Decimalwhere Decimal: Div<u16>,

§

type Output = <Decimal as Div<u16>>::Output

The resulting type after applying the / operator.
source§

fn div(self, rhs: &u16) -> <Decimal as Div<&u16>>::Output

Performs the / operation. Read more
source§

impl Div<&u32> for &Decimalwhere Decimal: Div<u32>,

§

type Output = <Decimal as Div<u32>>::Output

The resulting type after applying the / operator.
source§

fn div(self, rhs: &u32) -> <&Decimal as Div<&u32>>::Output

Performs the / operation. Read more
source§

impl Div<&u32> for Decimalwhere Decimal: Div<u32>,

§

type Output = <Decimal as Div<u32>>::Output

The resulting type after applying the / operator.
source§

fn div(self, rhs: &u32) -> <Decimal as Div<&u32>>::Output

Performs the / operation. Read more
source§

impl Div<&u64> for &Decimalwhere Decimal: Div<u64>,

§

type Output = <Decimal as Div<u64>>::Output

The resulting type after applying the / operator.
source§

fn div(self, rhs: &u64) -> <&Decimal as Div<&u64>>::Output

Performs the / operation. Read more
source§

impl Div<&u64> for Decimalwhere Decimal: Div<u64>,

§

type Output = <Decimal as Div<u64>>::Output

The resulting type after applying the / operator.
source§

fn div(self, rhs: &u64) -> <Decimal as Div<&u64>>::Output

Performs the / operation. Read more
source§

impl Div<&u8> for &Decimalwhere Decimal: Div<u8>,

§

type Output = <Decimal as Div<u8>>::Output

The resulting type after applying the / operator.
source§

fn div(self, rhs: &u8) -> <&Decimal as Div<&u8>>::Output

Performs the / operation. Read more
source§

impl Div<&u8> for Decimalwhere Decimal: Div<u8>,

§

type Output = <Decimal as Div<u8>>::Output

The resulting type after applying the / operator.
source§

fn div(self, rhs: &u8) -> <Decimal as Div<&u8>>::Output

Performs the / operation. Read more
source§

impl<'a> Div<Decimal> for &'a Decimalwhere Decimal: Div<Decimal>,

§

type Output = <Decimal as Div<Decimal>>::Output

The resulting type after applying the / operator.
source§

fn div(self, rhs: Decimal) -> <&'a Decimal as Div<Decimal>>::Output

Performs the / operation. Read more
source§

impl Div<Decimal> for BaseCurrency

§

type Output = BaseCurrency

The resulting type after applying the / operator.
source§

fn div(self, rhs: Decimal) -> Self::Output

Performs the / operation. Read more
source§

impl Div<Decimal> for Decimal

§

type Output = Decimal

The resulting type after applying the / operator.
source§

fn div(self, rhs: Decimal) -> <Decimal as Div<Decimal>>::Output

Performs the / operation. Read more
source§

impl Div<Decimal> for QuoteCurrency

§

type Output = QuoteCurrency

The resulting type after applying the / operator.
source§

fn div(self, rhs: Decimal) -> Self::Output

Performs the / operation. Read more
source§

impl<'a> Div<i128> for &'a Decimalwhere Decimal: Div<i128>,

§

type Output = <Decimal as Div<i128>>::Output

The resulting type after applying the / operator.
source§

fn div(self, rhs: i128) -> <&'a Decimal as Div<i128>>::Output

Performs the / operation. Read more
source§

impl Div<i128> for Decimal

§

type Output = Decimal

The resulting type after applying the / operator.
source§

fn div(self, rhs: i128) -> <Decimal as Div<i128>>::Output

Performs the / operation. Read more
source§

impl<'a> Div<i16> for &'a Decimalwhere Decimal: Div<i16>,

§

type Output = <Decimal as Div<i16>>::Output

The resulting type after applying the / operator.
source§

fn div(self, rhs: i16) -> <&'a Decimal as Div<i16>>::Output

Performs the / operation. Read more
source§

impl Div<i16> for Decimal

§

type Output = Decimal

The resulting type after applying the / operator.
source§

fn div(self, rhs: i16) -> <Decimal as Div<i16>>::Output

Performs the / operation. Read more
source§

impl<'a> Div<i32> for &'a Decimalwhere Decimal: Div<i32>,

§

type Output = <Decimal as Div<i32>>::Output

The resulting type after applying the / operator.
source§

fn div(self, rhs: i32) -> <&'a Decimal as Div<i32>>::Output

Performs the / operation. Read more
source§

impl Div<i32> for Decimal

§

type Output = Decimal

The resulting type after applying the / operator.
source§

fn div(self, rhs: i32) -> <Decimal as Div<i32>>::Output

Performs the / operation. Read more
source§

impl<'a> Div<i64> for &'a Decimalwhere Decimal: Div<i64>,

§

type Output = <Decimal as Div<i64>>::Output

The resulting type after applying the / operator.
source§

fn div(self, rhs: i64) -> <&'a Decimal as Div<i64>>::Output

Performs the / operation. Read more
source§

impl Div<i64> for Decimal

§

type Output = Decimal

The resulting type after applying the / operator.
source§

fn div(self, rhs: i64) -> <Decimal as Div<i64>>::Output

Performs the / operation. Read more
source§

impl<'a> Div<i8> for &'a Decimalwhere Decimal: Div<i8>,

§

type Output = <Decimal as Div<i8>>::Output

The resulting type after applying the / operator.
source§

fn div(self, rhs: i8) -> <&'a Decimal as Div<i8>>::Output

Performs the / operation. Read more
source§

impl Div<i8> for Decimal

§

type Output = Decimal

The resulting type after applying the / operator.
source§

fn div(self, rhs: i8) -> <Decimal as Div<i8>>::Output

Performs the / operation. Read more
source§

impl<'a> Div<u16> for &'a Decimalwhere Decimal: Div<u16>,

§

type Output = <Decimal as Div<u16>>::Output

The resulting type after applying the / operator.
source§

fn div(self, rhs: u16) -> <&'a Decimal as Div<u16>>::Output

Performs the / operation. Read more
source§

impl Div<u16> for Decimal

§

type Output = Decimal

The resulting type after applying the / operator.
source§

fn div(self, rhs: u16) -> <Decimal as Div<u16>>::Output

Performs the / operation. Read more
source§

impl<'a> Div<u32> for &'a Decimalwhere Decimal: Div<u32>,

§

type Output = <Decimal as Div<u32>>::Output

The resulting type after applying the / operator.
source§

fn div(self, rhs: u32) -> <&'a Decimal as Div<u32>>::Output

Performs the / operation. Read more
source§

impl Div<u32> for Decimal

§

type Output = Decimal

The resulting type after applying the / operator.
source§

fn div(self, rhs: u32) -> <Decimal as Div<u32>>::Output

Performs the / operation. Read more
source§

impl<'a> Div<u64> for &'a Decimalwhere Decimal: Div<u64>,

§

type Output = <Decimal as Div<u64>>::Output

The resulting type after applying the / operator.
source§

fn div(self, rhs: u64) -> <&'a Decimal as Div<u64>>::Output

Performs the / operation. Read more
source§

impl Div<u64> for Decimal

§

type Output = Decimal

The resulting type after applying the / operator.
source§

fn div(self, rhs: u64) -> <Decimal as Div<u64>>::Output

Performs the / operation. Read more
source§

impl<'a> Div<u8> for &'a Decimalwhere Decimal: Div<u8>,

§

type Output = <Decimal as Div<u8>>::Output

The resulting type after applying the / operator.
source§

fn div(self, rhs: u8) -> <&'a Decimal as Div<u8>>::Output

Performs the / operation. Read more
source§

impl Div<u8> for Decimal

§

type Output = Decimal

The resulting type after applying the / operator.
source§

fn div(self, rhs: u8) -> <Decimal as Div<u8>>::Output

Performs the / operation. Read more
source§

impl<T> DivAssign<T> for Decimalwhere Decimal: Div<T, Output = Decimal>,

source§

fn div_assign(&mut self, rhs: T)

Performs the /= operation. Read more
source§

impl DivRounded<&Decimal> for &Decimalwhere Decimal: DivRounded<Decimal>,

§

type Output = <Decimal as DivRounded<Decimal>>::Output

The resulting type after applying div_rounded.
source§

fn div_rounded(self, rhs: &Decimal, n_frac_digits: u8) -> Decimal

Returns self / rhs, rounded to n_frac_digits, according to the current RoundingMode. Read more
source§

impl DivRounded<&Decimal> for Decimalwhere Decimal: DivRounded<Decimal>,

§

type Output = <Decimal as DivRounded<Decimal>>::Output

The resulting type after applying div_rounded.
source§

fn div_rounded(self, rhs: &Decimal, n_frac_digits: u8) -> Decimal

Returns self / rhs, rounded to n_frac_digits, according to the current RoundingMode. Read more
source§

impl DivRounded<&i128> for &Decimalwhere Decimal: DivRounded<i128>,

§

type Output = <Decimal as DivRounded<i128>>::Output

The resulting type after applying div_rounded.
source§

fn div_rounded( self, rhs: &i128, n_frac_digits: u8 ) -> <&Decimal as DivRounded<&i128>>::Output

Returns self / rhs, rounded to n_frac_digits, according to the current RoundingMode. Read more
source§

impl DivRounded<&i128> for Decimalwhere Decimal: DivRounded<i128>,

§

type Output = <Decimal as DivRounded<i128>>::Output

The resulting type after applying div_rounded.
source§

fn div_rounded( self, rhs: &i128, n_frac_digits: u8 ) -> <Decimal as DivRounded<&i128>>::Output

Returns self / rhs, rounded to n_frac_digits, according to the current RoundingMode. Read more
source§

impl DivRounded<&i16> for &Decimalwhere Decimal: DivRounded<i16>,

§

type Output = <Decimal as DivRounded<i16>>::Output

The resulting type after applying div_rounded.
source§

fn div_rounded( self, rhs: &i16, n_frac_digits: u8 ) -> <&Decimal as DivRounded<&i16>>::Output

Returns self / rhs, rounded to n_frac_digits, according to the current RoundingMode. Read more
source§

impl DivRounded<&i16> for Decimalwhere Decimal: DivRounded<i16>,

§

type Output = <Decimal as DivRounded<i16>>::Output

The resulting type after applying div_rounded.
source§

fn div_rounded( self, rhs: &i16, n_frac_digits: u8 ) -> <Decimal as DivRounded<&i16>>::Output

Returns self / rhs, rounded to n_frac_digits, according to the current RoundingMode. Read more
source§

impl DivRounded<&i32> for &Decimalwhere Decimal: DivRounded<i32>,

§

type Output = <Decimal as DivRounded<i32>>::Output

The resulting type after applying div_rounded.
source§

fn div_rounded( self, rhs: &i32, n_frac_digits: u8 ) -> <&Decimal as DivRounded<&i32>>::Output

Returns self / rhs, rounded to n_frac_digits, according to the current RoundingMode. Read more
source§

impl DivRounded<&i32> for Decimalwhere Decimal: DivRounded<i32>,

§

type Output = <Decimal as DivRounded<i32>>::Output

The resulting type after applying div_rounded.
source§

fn div_rounded( self, rhs: &i32, n_frac_digits: u8 ) -> <Decimal as DivRounded<&i32>>::Output

Returns self / rhs, rounded to n_frac_digits, according to the current RoundingMode. Read more
source§

impl DivRounded<&i64> for &Decimalwhere Decimal: DivRounded<i64>,

§

type Output = <Decimal as DivRounded<i64>>::Output

The resulting type after applying div_rounded.
source§

fn div_rounded( self, rhs: &i64, n_frac_digits: u8 ) -> <&Decimal as DivRounded<&i64>>::Output

Returns self / rhs, rounded to n_frac_digits, according to the current RoundingMode. Read more
source§

impl DivRounded<&i64> for Decimalwhere Decimal: DivRounded<i64>,

§

type Output = <Decimal as DivRounded<i64>>::Output

The resulting type after applying div_rounded.
source§

fn div_rounded( self, rhs: &i64, n_frac_digits: u8 ) -> <Decimal as DivRounded<&i64>>::Output

Returns self / rhs, rounded to n_frac_digits, according to the current RoundingMode. Read more
source§

impl DivRounded<&i8> for &Decimalwhere Decimal: DivRounded<i8>,

§

type Output = <Decimal as DivRounded<i8>>::Output

The resulting type after applying div_rounded.
source§

fn div_rounded( self, rhs: &i8, n_frac_digits: u8 ) -> <&Decimal as DivRounded<&i8>>::Output

Returns self / rhs, rounded to n_frac_digits, according to the current RoundingMode. Read more
source§

impl DivRounded<&i8> for Decimalwhere Decimal: DivRounded<i8>,

§

type Output = <Decimal as DivRounded<i8>>::Output

The resulting type after applying div_rounded.
source§

fn div_rounded( self, rhs: &i8, n_frac_digits: u8 ) -> <Decimal as DivRounded<&i8>>::Output

Returns self / rhs, rounded to n_frac_digits, according to the current RoundingMode. Read more
source§

impl DivRounded<&u16> for &Decimalwhere Decimal: DivRounded<u16>,

§

type Output = <Decimal as DivRounded<u16>>::Output

The resulting type after applying div_rounded.
source§

fn div_rounded( self, rhs: &u16, n_frac_digits: u8 ) -> <&Decimal as DivRounded<&u16>>::Output

Returns self / rhs, rounded to n_frac_digits, according to the current RoundingMode. Read more
source§

impl DivRounded<&u16> for Decimalwhere Decimal: DivRounded<u16>,

§

type Output = <Decimal as DivRounded<u16>>::Output

The resulting type after applying div_rounded.
source§

fn div_rounded( self, rhs: &u16, n_frac_digits: u8 ) -> <Decimal as DivRounded<&u16>>::Output

Returns self / rhs, rounded to n_frac_digits, according to the current RoundingMode. Read more
source§

impl DivRounded<&u32> for &Decimalwhere Decimal: DivRounded<u32>,

§

type Output = <Decimal as DivRounded<u32>>::Output

The resulting type after applying div_rounded.
source§

fn div_rounded( self, rhs: &u32, n_frac_digits: u8 ) -> <&Decimal as DivRounded<&u32>>::Output

Returns self / rhs, rounded to n_frac_digits, according to the current RoundingMode. Read more
source§

impl DivRounded<&u32> for Decimalwhere Decimal: DivRounded<u32>,

§

type Output = <Decimal as DivRounded<u32>>::Output

The resulting type after applying div_rounded.
source§

fn div_rounded( self, rhs: &u32, n_frac_digits: u8 ) -> <Decimal as DivRounded<&u32>>::Output

Returns self / rhs, rounded to n_frac_digits, according to the current RoundingMode. Read more
source§

impl DivRounded<&u64> for &Decimalwhere Decimal: DivRounded<u64>,

§

type Output = <Decimal as DivRounded<u64>>::Output

The resulting type after applying div_rounded.
source§

fn div_rounded( self, rhs: &u64, n_frac_digits: u8 ) -> <&Decimal as DivRounded<&u64>>::Output

Returns self / rhs, rounded to n_frac_digits, according to the current RoundingMode. Read more
source§

impl DivRounded<&u64> for Decimalwhere Decimal: DivRounded<u64>,

§

type Output = <Decimal as DivRounded<u64>>::Output

The resulting type after applying div_rounded.
source§

fn div_rounded( self, rhs: &u64, n_frac_digits: u8 ) -> <Decimal as DivRounded<&u64>>::Output

Returns self / rhs, rounded to n_frac_digits, according to the current RoundingMode. Read more
source§

impl DivRounded<&u8> for &Decimalwhere Decimal: DivRounded<u8>,

§

type Output = <Decimal as DivRounded<u8>>::Output

The resulting type after applying div_rounded.
source§

fn div_rounded( self, rhs: &u8, n_frac_digits: u8 ) -> <&Decimal as DivRounded<&u8>>::Output

Returns self / rhs, rounded to n_frac_digits, according to the current RoundingMode. Read more
source§

impl DivRounded<&u8> for Decimalwhere Decimal: DivRounded<u8>,

§

type Output = <Decimal as DivRounded<u8>>::Output

The resulting type after applying div_rounded.
source§

fn div_rounded( self, rhs: &u8, n_frac_digits: u8 ) -> <Decimal as DivRounded<&u8>>::Output

Returns self / rhs, rounded to n_frac_digits, according to the current RoundingMode. Read more
source§

impl<'a> DivRounded<Decimal> for &'a Decimalwhere Decimal: DivRounded<Decimal>,

§

type Output = <Decimal as DivRounded<Decimal>>::Output

The resulting type after applying div_rounded.
source§

fn div_rounded(self, rhs: Decimal, n_frac_digits: u8) -> Decimal

Returns self / rhs, rounded to n_frac_digits, according to the current RoundingMode. Read more
source§

impl DivRounded<Decimal> for Decimal

§

type Output = Decimal

The resulting type after applying div_rounded.
source§

fn div_rounded( self, rhs: Decimal, n_frac_digits: u8 ) -> <Decimal as DivRounded<Decimal>>::Output

Returns self / rhs, rounded to n_frac_digits, according to the current RoundingMode. Read more
source§

impl<'a> DivRounded<i128> for &'a Decimalwhere Decimal: DivRounded<i128>,

§

type Output = <Decimal as DivRounded<i128>>::Output

The resulting type after applying div_rounded.
source§

fn div_rounded( self, rhs: i128, n_frac_digits: u8 ) -> <&'a Decimal as DivRounded<i128>>::Output

Returns self / rhs, rounded to n_frac_digits, according to the current RoundingMode. Read more
source§

impl DivRounded<i128> for Decimal

§

type Output = Decimal

The resulting type after applying div_rounded.
source§

fn div_rounded( self, rhs: i128, n_frac_digits: u8 ) -> <Decimal as DivRounded<i128>>::Output

Returns self / rhs, rounded to n_frac_digits, according to the current RoundingMode. Read more
source§

impl<'a> DivRounded<i16> for &'a Decimalwhere Decimal: DivRounded<i16>,

§

type Output = <Decimal as DivRounded<i16>>::Output

The resulting type after applying div_rounded.
source§

fn div_rounded( self, rhs: i16, n_frac_digits: u8 ) -> <&'a Decimal as DivRounded<i16>>::Output

Returns self / rhs, rounded to n_frac_digits, according to the current RoundingMode. Read more
source§

impl DivRounded<i16> for Decimal

§

type Output = Decimal

The resulting type after applying div_rounded.
source§

fn div_rounded( self, rhs: i16, n_frac_digits: u8 ) -> <Decimal as DivRounded<i16>>::Output

Returns self / rhs, rounded to n_frac_digits, according to the current RoundingMode. Read more
source§

impl<'a> DivRounded<i32> for &'a Decimalwhere Decimal: DivRounded<i32>,

§

type Output = <Decimal as DivRounded<i32>>::Output

The resulting type after applying div_rounded.
source§

fn div_rounded( self, rhs: i32, n_frac_digits: u8 ) -> <&'a Decimal as DivRounded<i32>>::Output

Returns self / rhs, rounded to n_frac_digits, according to the current RoundingMode. Read more
source§

impl DivRounded<i32> for Decimal

§

type Output = Decimal

The resulting type after applying div_rounded.
source§

fn div_rounded( self, rhs: i32, n_frac_digits: u8 ) -> <Decimal as DivRounded<i32>>::Output

Returns self / rhs, rounded to n_frac_digits, according to the current RoundingMode. Read more
source§

impl<'a> DivRounded<i64> for &'a Decimalwhere Decimal: DivRounded<i64>,

§

type Output = <Decimal as DivRounded<i64>>::Output

The resulting type after applying div_rounded.
source§

fn div_rounded( self, rhs: i64, n_frac_digits: u8 ) -> <&'a Decimal as DivRounded<i64>>::Output

Returns self / rhs, rounded to n_frac_digits, according to the current RoundingMode. Read more
source§

impl DivRounded<i64> for Decimal

§

type Output = Decimal

The resulting type after applying div_rounded.
source§

fn div_rounded( self, rhs: i64, n_frac_digits: u8 ) -> <Decimal as DivRounded<i64>>::Output

Returns self / rhs, rounded to n_frac_digits, according to the current RoundingMode. Read more
source§

impl<'a> DivRounded<i8> for &'a Decimalwhere Decimal: DivRounded<i8>,

§

type Output = <Decimal as DivRounded<i8>>::Output

The resulting type after applying div_rounded.
source§

fn div_rounded( self, rhs: i8, n_frac_digits: u8 ) -> <&'a Decimal as DivRounded<i8>>::Output

Returns self / rhs, rounded to n_frac_digits, according to the current RoundingMode. Read more
source§

impl DivRounded<i8> for Decimal

§

type Output = Decimal

The resulting type after applying div_rounded.
source§

fn div_rounded( self, rhs: i8, n_frac_digits: u8 ) -> <Decimal as DivRounded<i8>>::Output

Returns self / rhs, rounded to n_frac_digits, according to the current RoundingMode. Read more
source§

impl<'a> DivRounded<u16> for &'a Decimalwhere Decimal: DivRounded<u16>,

§

type Output = <Decimal as DivRounded<u16>>::Output

The resulting type after applying div_rounded.
source§

fn div_rounded( self, rhs: u16, n_frac_digits: u8 ) -> <&'a Decimal as DivRounded<u16>>::Output

Returns self / rhs, rounded to n_frac_digits, according to the current RoundingMode. Read more
source§

impl DivRounded<u16> for Decimal

§

type Output = Decimal

The resulting type after applying div_rounded.
source§

fn div_rounded( self, rhs: u16, n_frac_digits: u8 ) -> <Decimal as DivRounded<u16>>::Output

Returns self / rhs, rounded to n_frac_digits, according to the current RoundingMode. Read more
source§

impl<'a> DivRounded<u32> for &'a Decimalwhere Decimal: DivRounded<u32>,

§

type Output = <Decimal as DivRounded<u32>>::Output

The resulting type after applying div_rounded.
source§

fn div_rounded( self, rhs: u32, n_frac_digits: u8 ) -> <&'a Decimal as DivRounded<u32>>::Output

Returns self / rhs, rounded to n_frac_digits, according to the current RoundingMode. Read more
source§

impl DivRounded<u32> for Decimal

§

type Output = Decimal

The resulting type after applying div_rounded.
source§

fn div_rounded( self, rhs: u32, n_frac_digits: u8 ) -> <Decimal as DivRounded<u32>>::Output

Returns self / rhs, rounded to n_frac_digits, according to the current RoundingMode. Read more
source§

impl<'a> DivRounded<u64> for &'a Decimalwhere Decimal: DivRounded<u64>,

§

type Output = <Decimal as DivRounded<u64>>::Output

The resulting type after applying div_rounded.
source§

fn div_rounded( self, rhs: u64, n_frac_digits: u8 ) -> <&'a Decimal as DivRounded<u64>>::Output

Returns self / rhs, rounded to n_frac_digits, according to the current RoundingMode. Read more
source§

impl DivRounded<u64> for Decimal

§

type Output = Decimal

The resulting type after applying div_rounded.
source§

fn div_rounded( self, rhs: u64, n_frac_digits: u8 ) -> <Decimal as DivRounded<u64>>::Output

Returns self / rhs, rounded to n_frac_digits, according to the current RoundingMode. Read more
source§

impl<'a> DivRounded<u8> for &'a Decimalwhere Decimal: DivRounded<u8>,

§

type Output = <Decimal as DivRounded<u8>>::Output

The resulting type after applying div_rounded.
source§

fn div_rounded( self, rhs: u8, n_frac_digits: u8 ) -> <&'a Decimal as DivRounded<u8>>::Output

Returns self / rhs, rounded to n_frac_digits, according to the current RoundingMode. Read more
source§

impl DivRounded<u8> for Decimal

§

type Output = Decimal

The resulting type after applying div_rounded.
source§

fn div_rounded( self, rhs: u8, n_frac_digits: u8 ) -> <Decimal as DivRounded<u8>>::Output

Returns self / rhs, rounded to n_frac_digits, according to the current RoundingMode. Read more
source§

impl From<BaseCurrency> for Decimal

source§

fn from(original: BaseCurrency) -> Self

Converts to this type from the input type.
source§

impl From<Decimal> for BaseCurrency

source§

fn from(original: Decimal) -> BaseCurrency

Converts to this type from the input type.
source§

impl From<Decimal> for QuoteCurrency

source§

fn from(original: Decimal) -> QuoteCurrency

Converts to this type from the input type.
source§

impl From<QuoteCurrency> for Decimal

source§

fn from(original: QuoteCurrency) -> Self

Converts to this type from the input type.
source§

impl From<i128> for Decimal

source§

fn from(i: i128) -> Decimal

Converts to this type from the input type.
source§

impl From<i16> for Decimal

source§

fn from(i: i16) -> Decimal

Converts to this type from the input type.
source§

impl From<i32> for Decimal

source§

fn from(i: i32) -> Decimal

Converts to this type from the input type.
source§

impl From<i64> for Decimal

source§

fn from(i: i64) -> Decimal

Converts to this type from the input type.
source§

impl From<i8> for Decimal

source§

fn from(i: i8) -> Decimal

Converts to this type from the input type.
source§

impl From<u16> for Decimal

source§

fn from(i: u16) -> Decimal

Converts to this type from the input type.
source§

impl From<u32> for Decimal

source§

fn from(i: u32) -> Decimal

Converts to this type from the input type.
source§

impl From<u64> for Decimal

source§

fn from(i: u64) -> Decimal

Converts to this type from the input type.
source§

impl From<u8> for Decimal

source§

fn from(i: u8) -> Decimal

Converts to this type from the input type.
source§

impl FromStr for Decimal

source§

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 in lit 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");
§

type Err = ParseDecimalError

The associated error which can be returned from parsing.
source§

impl Mul<&Decimal> for &Decimalwhere Decimal: Mul<Decimal>,

§

type Output = <Decimal as Mul<Decimal>>::Output

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &Decimal) -> <&Decimal as Mul<&Decimal>>::Output

Performs the * operation. Read more
source§

impl Mul<&Decimal> for Decimalwhere Decimal: Mul<Decimal>,

§

type Output = <Decimal as Mul<Decimal>>::Output

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &Decimal) -> <Decimal as Mul<&Decimal>>::Output

Performs the * operation. Read more
source§

impl Mul<&i128> for &Decimalwhere Decimal: Mul<i128>,

§

type Output = <Decimal as Mul<i128>>::Output

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &i128) -> <&Decimal as Mul<&i128>>::Output

Performs the * operation. Read more
source§

impl Mul<&i128> for Decimalwhere Decimal: Mul<i128>,

§

type Output = <Decimal as Mul<i128>>::Output

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &i128) -> <Decimal as Mul<&i128>>::Output

Performs the * operation. Read more
source§

impl Mul<&i16> for &Decimalwhere Decimal: Mul<i16>,

§

type Output = <Decimal as Mul<i16>>::Output

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &i16) -> <&Decimal as Mul<&i16>>::Output

Performs the * operation. Read more
source§

impl Mul<&i16> for Decimalwhere Decimal: Mul<i16>,

§

type Output = <Decimal as Mul<i16>>::Output

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &i16) -> <Decimal as Mul<&i16>>::Output

Performs the * operation. Read more
source§

impl Mul<&i32> for &Decimalwhere Decimal: Mul<i32>,

§

type Output = <Decimal as Mul<i32>>::Output

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &i32) -> <&Decimal as Mul<&i32>>::Output

Performs the * operation. Read more
source§

impl Mul<&i32> for Decimalwhere Decimal: Mul<i32>,

§

type Output = <Decimal as Mul<i32>>::Output

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &i32) -> <Decimal as Mul<&i32>>::Output

Performs the * operation. Read more
source§

impl Mul<&i64> for &Decimalwhere Decimal: Mul<i64>,

§

type Output = <Decimal as Mul<i64>>::Output

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &i64) -> <&Decimal as Mul<&i64>>::Output

Performs the * operation. Read more
source§

impl Mul<&i64> for Decimalwhere Decimal: Mul<i64>,

§

type Output = <Decimal as Mul<i64>>::Output

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &i64) -> <Decimal as Mul<&i64>>::Output

Performs the * operation. Read more
source§

impl Mul<&i8> for &Decimalwhere Decimal: Mul<i8>,

§

type Output = <Decimal as Mul<i8>>::Output

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &i8) -> <&Decimal as Mul<&i8>>::Output

Performs the * operation. Read more
source§

impl Mul<&i8> for Decimalwhere Decimal: Mul<i8>,

§

type Output = <Decimal as Mul<i8>>::Output

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &i8) -> <Decimal as Mul<&i8>>::Output

Performs the * operation. Read more
source§

impl Mul<&u16> for &Decimalwhere Decimal: Mul<u16>,

§

type Output = <Decimal as Mul<u16>>::Output

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &u16) -> <&Decimal as Mul<&u16>>::Output

Performs the * operation. Read more
source§

impl Mul<&u16> for Decimalwhere Decimal: Mul<u16>,

§

type Output = <Decimal as Mul<u16>>::Output

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &u16) -> <Decimal as Mul<&u16>>::Output

Performs the * operation. Read more
source§

impl Mul<&u32> for &Decimalwhere Decimal: Mul<u32>,

§

type Output = <Decimal as Mul<u32>>::Output

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &u32) -> <&Decimal as Mul<&u32>>::Output

Performs the * operation. Read more
source§

impl Mul<&u32> for Decimalwhere Decimal: Mul<u32>,

§

type Output = <Decimal as Mul<u32>>::Output

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &u32) -> <Decimal as Mul<&u32>>::Output

Performs the * operation. Read more
source§

impl Mul<&u64> for &Decimalwhere Decimal: Mul<u64>,

§

type Output = <Decimal as Mul<u64>>::Output

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &u64) -> <&Decimal as Mul<&u64>>::Output

Performs the * operation. Read more
source§

impl Mul<&u64> for Decimalwhere Decimal: Mul<u64>,

§

type Output = <Decimal as Mul<u64>>::Output

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &u64) -> <Decimal as Mul<&u64>>::Output

Performs the * operation. Read more
source§

impl Mul<&u8> for &Decimalwhere Decimal: Mul<u8>,

§

type Output = <Decimal as Mul<u8>>::Output

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &u8) -> <&Decimal as Mul<&u8>>::Output

Performs the * operation. Read more
source§

impl Mul<&u8> for Decimalwhere Decimal: Mul<u8>,

§

type Output = <Decimal as Mul<u8>>::Output

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &u8) -> <Decimal as Mul<&u8>>::Output

Performs the * operation. Read more
source§

impl<'a> Mul<Decimal> for &'a Decimalwhere Decimal: Mul<Decimal>,

§

type Output = <Decimal as Mul<Decimal>>::Output

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Decimal) -> <&'a Decimal as Mul<Decimal>>::Output

Performs the * operation. Read more
source§

impl Mul<Decimal> for BaseCurrency

§

type Output = BaseCurrency

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Decimal) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<Decimal> for Decimal

§

type Output = Decimal

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Decimal) -> <Decimal as Mul<Decimal>>::Output

Performs the * operation. Read more
source§

impl Mul<Decimal> for QuoteCurrency

§

type Output = QuoteCurrency

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Decimal) -> Self::Output

Performs the * operation. Read more
source§

impl<'a> Mul<i128> for &'a Decimalwhere Decimal: Mul<i128>,

§

type Output = <Decimal as Mul<i128>>::Output

The resulting type after applying the * operator.
source§

fn mul(self, rhs: i128) -> <&'a Decimal as Mul<i128>>::Output

Performs the * operation. Read more
source§

impl Mul<i128> for Decimal

§

type Output = Decimal

The resulting type after applying the * operator.
source§

fn mul(self, rhs: i128) -> <Decimal as Mul<i128>>::Output

Performs the * operation. Read more
source§

impl<'a> Mul<i16> for &'a Decimalwhere Decimal: Mul<i16>,

§

type Output = <Decimal as Mul<i16>>::Output

The resulting type after applying the * operator.
source§

fn mul(self, rhs: i16) -> <&'a Decimal as Mul<i16>>::Output

Performs the * operation. Read more
source§

impl Mul<i16> for Decimal

§

type Output = Decimal

The resulting type after applying the * operator.
source§

fn mul(self, rhs: i16) -> <Decimal as Mul<i16>>::Output

Performs the * operation. Read more
source§

impl<'a> Mul<i32> for &'a Decimalwhere Decimal: Mul<i32>,

§

type Output = <Decimal as Mul<i32>>::Output

The resulting type after applying the * operator.
source§

fn mul(self, rhs: i32) -> <&'a Decimal as Mul<i32>>::Output

Performs the * operation. Read more
source§

impl Mul<i32> for Decimal

§

type Output = Decimal

The resulting type after applying the * operator.
source§

fn mul(self, rhs: i32) -> <Decimal as Mul<i32>>::Output

Performs the * operation. Read more
source§

impl<'a> Mul<i64> for &'a Decimalwhere Decimal: Mul<i64>,

§

type Output = <Decimal as Mul<i64>>::Output

The resulting type after applying the * operator.
source§

fn mul(self, rhs: i64) -> <&'a Decimal as Mul<i64>>::Output

Performs the * operation. Read more
source§

impl Mul<i64> for Decimal

§

type Output = Decimal

The resulting type after applying the * operator.
source§

fn mul(self, rhs: i64) -> <Decimal as Mul<i64>>::Output

Performs the * operation. Read more
source§

impl<'a> Mul<i8> for &'a Decimalwhere Decimal: Mul<i8>,

§

type Output = <Decimal as Mul<i8>>::Output

The resulting type after applying the * operator.
source§

fn mul(self, rhs: i8) -> <&'a Decimal as Mul<i8>>::Output

Performs the * operation. Read more
source§

impl Mul<i8> for Decimal

§

type Output = Decimal

The resulting type after applying the * operator.
source§

fn mul(self, rhs: i8) -> <Decimal as Mul<i8>>::Output

Performs the * operation. Read more
source§

impl<'a> Mul<u16> for &'a Decimalwhere Decimal: Mul<u16>,

§

type Output = <Decimal as Mul<u16>>::Output

The resulting type after applying the * operator.
source§

fn mul(self, rhs: u16) -> <&'a Decimal as Mul<u16>>::Output

Performs the * operation. Read more
source§

impl Mul<u16> for Decimal

§

type Output = Decimal

The resulting type after applying the * operator.
source§

fn mul(self, rhs: u16) -> <Decimal as Mul<u16>>::Output

Performs the * operation. Read more
source§

impl<'a> Mul<u32> for &'a Decimalwhere Decimal: Mul<u32>,

§

type Output = <Decimal as Mul<u32>>::Output

The resulting type after applying the * operator.
source§

fn mul(self, rhs: u32) -> <&'a Decimal as Mul<u32>>::Output

Performs the * operation. Read more
source§

impl Mul<u32> for Decimal

§

type Output = Decimal

The resulting type after applying the * operator.
source§

fn mul(self, rhs: u32) -> <Decimal as Mul<u32>>::Output

Performs the * operation. Read more
source§

impl<'a> Mul<u64> for &'a Decimalwhere Decimal: Mul<u64>,

§

type Output = <Decimal as Mul<u64>>::Output

The resulting type after applying the * operator.
source§

fn mul(self, rhs: u64) -> <&'a Decimal as Mul<u64>>::Output

Performs the * operation. Read more
source§

impl Mul<u64> for Decimal

§

type Output = Decimal

The resulting type after applying the * operator.
source§

fn mul(self, rhs: u64) -> <Decimal as Mul<u64>>::Output

Performs the * operation. Read more
source§

impl<'a> Mul<u8> for &'a Decimalwhere Decimal: Mul<u8>,

§

type Output = <Decimal as Mul<u8>>::Output

The resulting type after applying the * operator.
source§

fn mul(self, rhs: u8) -> <&'a Decimal as Mul<u8>>::Output

Performs the * operation. Read more
source§

impl Mul<u8> for Decimal

§

type Output = Decimal

The resulting type after applying the * operator.
source§

fn mul(self, rhs: u8) -> <Decimal as Mul<u8>>::Output

Performs the * operation. Read more
source§

impl<T> MulAssign<T> for Decimalwhere Decimal: Mul<T, Output = Decimal>,

source§

fn mul_assign(&mut self, rhs: T)

Performs the *= operation. Read more
source§

impl MulRounded<&Decimal> for &Decimalwhere Decimal: MulRounded<Decimal>,

§

type Output = <Decimal as MulRounded<Decimal>>::Output

The resulting type after applying mul_rounded.
source§

fn mul_rounded(self, rhs: &Decimal, n_frac_digits: u8) -> Decimal

Returns self * rhs, rounded to n_frac_digits.
source§

impl MulRounded<&Decimal> for Decimalwhere Decimal: MulRounded<Decimal>,

§

type Output = <Decimal as MulRounded<Decimal>>::Output

The resulting type after applying mul_rounded.
source§

fn mul_rounded(self, rhs: &Decimal, n_frac_digits: u8) -> Decimal

Returns self * rhs, rounded to n_frac_digits.
source§

impl<'a> MulRounded<Decimal> for &'a Decimalwhere Decimal: MulRounded<Decimal>,

§

type Output = <Decimal as MulRounded<Decimal>>::Output

The resulting type after applying mul_rounded.
source§

fn mul_rounded(self, rhs: Decimal, n_frac_digits: u8) -> Decimal

Returns self * rhs, rounded to n_frac_digits.
source§

impl MulRounded<Decimal> for Decimal

§

type Output = Decimal

The resulting type after applying mul_rounded.
source§

fn mul_rounded( self, rhs: Decimal, n_frac_digits: u8 ) -> <Decimal as MulRounded<Decimal>>::Output

Returns self * rhs, rounded to n_frac_digits.
source§

impl Neg for &Decimal

source§

fn neg(self) -> <&Decimal as Neg>::Output

Returns -self.

#Panics

Panics with ‘attempt to negate with overflow’ when called on a Decimal with a coefficient equal to i128::MIN!

§

type Output = <Decimal as Neg>::Output

The resulting type after applying the - operator.
source§

impl Neg for Decimal

source§

fn neg(self) -> <Decimal as Neg>::Output

Returns -self.

Panics

Panics with ‘attempt to negate with overflow’ when called on a Decimal with a coefficient equal to i128::MIN!

§

type Output = Decimal

The resulting type after applying the - operator.
source§

impl Ord for Decimal

source§

fn cmp(&self, other: &Decimal) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Selfwhere Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Selfwhere Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Selfwhere Self: Sized + PartialOrd<Self>,

Restrict a value to a certain interval. Read more
source§

impl PartialEq<Decimal> for Decimal

source§

fn eq(&self, other: &Decimal) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<i128> for Decimal

source§

fn eq(&self, other: &i128) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<i16> for Decimal

source§

fn eq(&self, other: &i16) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<i32> for Decimal

source§

fn eq(&self, other: &i32) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<i64> for Decimal

source§

fn eq(&self, other: &i64) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<i8> for Decimal

source§

fn eq(&self, other: &i8) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<u16> for Decimal

source§

fn eq(&self, other: &u16) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<u32> for Decimal

source§

fn eq(&self, other: &u32) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<u64> for Decimal

source§

fn eq(&self, other: &u64) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<u8> for Decimal

source§

fn eq(&self, other: &u8) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd<Decimal> for Decimal

source§

fn partial_cmp(&self, other: &Decimal) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl PartialOrd<i128> for Decimal

source§

fn partial_cmp(&self, other: &i128) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl PartialOrd<i16> for Decimal

source§

fn partial_cmp(&self, other: &i16) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl PartialOrd<i32> for Decimal

source§

fn partial_cmp(&self, other: &i32) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl PartialOrd<i64> for Decimal

source§

fn partial_cmp(&self, other: &i64) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl PartialOrd<i8> for Decimal

source§

fn partial_cmp(&self, other: &i8) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl PartialOrd<u16> for Decimal

source§

fn partial_cmp(&self, other: &u16) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl PartialOrd<u32> for Decimal

source§

fn partial_cmp(&self, other: &u32) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl PartialOrd<u64> for Decimal

source§

fn partial_cmp(&self, other: &u64) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl PartialOrd<u8> for Decimal

source§

fn partial_cmp(&self, other: &u8) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl Rem<&Decimal> for &Decimalwhere Decimal: Rem<Decimal>,

§

type Output = <Decimal as Rem<Decimal>>::Output

The resulting type after applying the % operator.
source§

fn rem(self, rhs: &Decimal) -> <&Decimal as Rem<&Decimal>>::Output

Performs the % operation. Read more
source§

impl Rem<&Decimal> for Decimalwhere Decimal: Rem<Decimal>,

§

type Output = <Decimal as Rem<Decimal>>::Output

The resulting type after applying the % operator.
source§

fn rem(self, rhs: &Decimal) -> <Decimal as Rem<&Decimal>>::Output

Performs the % operation. Read more
source§

impl Rem<&i128> for &Decimalwhere Decimal: Rem<i128>,

§

type Output = <Decimal as Rem<i128>>::Output

The resulting type after applying the % operator.
source§

fn rem(self, rhs: &i128) -> <&Decimal as Rem<&i128>>::Output

Performs the % operation. Read more
source§

impl Rem<&i128> for Decimalwhere Decimal: Rem<i128>,

§

type Output = <Decimal as Rem<i128>>::Output

The resulting type after applying the % operator.
source§

fn rem(self, rhs: &i128) -> <Decimal as Rem<&i128>>::Output

Performs the % operation. Read more
source§

impl Rem<&i16> for &Decimalwhere Decimal: Rem<i16>,

§

type Output = <Decimal as Rem<i16>>::Output

The resulting type after applying the % operator.
source§

fn rem(self, rhs: &i16) -> <&Decimal as Rem<&i16>>::Output

Performs the % operation. Read more
source§

impl Rem<&i16> for Decimalwhere Decimal: Rem<i16>,

§

type Output = <Decimal as Rem<i16>>::Output

The resulting type after applying the % operator.
source§

fn rem(self, rhs: &i16) -> <Decimal as Rem<&i16>>::Output

Performs the % operation. Read more
source§

impl Rem<&i32> for &Decimalwhere Decimal: Rem<i32>,

§

type Output = <Decimal as Rem<i32>>::Output

The resulting type after applying the % operator.
source§

fn rem(self, rhs: &i32) -> <&Decimal as Rem<&i32>>::Output

Performs the % operation. Read more
source§

impl Rem<&i32> for Decimalwhere Decimal: Rem<i32>,

§

type Output = <Decimal as Rem<i32>>::Output

The resulting type after applying the % operator.
source§

fn rem(self, rhs: &i32) -> <Decimal as Rem<&i32>>::Output

Performs the % operation. Read more
source§

impl Rem<&i64> for &Decimalwhere Decimal: Rem<i64>,

§

type Output = <Decimal as Rem<i64>>::Output

The resulting type after applying the % operator.
source§

fn rem(self, rhs: &i64) -> <&Decimal as Rem<&i64>>::Output

Performs the % operation. Read more
source§

impl Rem<&i64> for Decimalwhere Decimal: Rem<i64>,

§

type Output = <Decimal as Rem<i64>>::Output

The resulting type after applying the % operator.
source§

fn rem(self, rhs: &i64) -> <Decimal as Rem<&i64>>::Output

Performs the % operation. Read more
source§

impl Rem<&i8> for &Decimalwhere Decimal: Rem<i8>,

§

type Output = <Decimal as Rem<i8>>::Output

The resulting type after applying the % operator.
source§

fn rem(self, rhs: &i8) -> <&Decimal as Rem<&i8>>::Output

Performs the % operation. Read more
source§

impl Rem<&i8> for Decimalwhere Decimal: Rem<i8>,

§

type Output = <Decimal as Rem<i8>>::Output

The resulting type after applying the % operator.
source§

fn rem(self, rhs: &i8) -> <Decimal as Rem<&i8>>::Output

Performs the % operation. Read more
source§

impl Rem<&u16> for &Decimalwhere Decimal: Rem<u16>,

§

type Output = <Decimal as Rem<u16>>::Output

The resulting type after applying the % operator.
source§

fn rem(self, rhs: &u16) -> <&Decimal as Rem<&u16>>::Output

Performs the % operation. Read more
source§

impl Rem<&u16> for Decimalwhere Decimal: Rem<u16>,

§

type Output = <Decimal as Rem<u16>>::Output

The resulting type after applying the % operator.
source§

fn rem(self, rhs: &u16) -> <Decimal as Rem<&u16>>::Output

Performs the % operation. Read more
source§

impl Rem<&u32> for &Decimalwhere Decimal: Rem<u32>,

§

type Output = <Decimal as Rem<u32>>::Output

The resulting type after applying the % operator.
source§

fn rem(self, rhs: &u32) -> <&Decimal as Rem<&u32>>::Output

Performs the % operation. Read more
source§

impl Rem<&u32> for Decimalwhere Decimal: Rem<u32>,

§

type Output = <Decimal as Rem<u32>>::Output

The resulting type after applying the % operator.
source§

fn rem(self, rhs: &u32) -> <Decimal as Rem<&u32>>::Output

Performs the % operation. Read more
source§

impl Rem<&u64> for &Decimalwhere Decimal: Rem<u64>,

§

type Output = <Decimal as Rem<u64>>::Output

The resulting type after applying the % operator.
source§

fn rem(self, rhs: &u64) -> <&Decimal as Rem<&u64>>::Output

Performs the % operation. Read more
source§

impl Rem<&u64> for Decimalwhere Decimal: Rem<u64>,

§

type Output = <Decimal as Rem<u64>>::Output

The resulting type after applying the % operator.
source§

fn rem(self, rhs: &u64) -> <Decimal as Rem<&u64>>::Output

Performs the % operation. Read more
source§

impl Rem<&u8> for &Decimalwhere Decimal: Rem<u8>,

§

type Output = <Decimal as Rem<u8>>::Output

The resulting type after applying the % operator.
source§

fn rem(self, rhs: &u8) -> <&Decimal as Rem<&u8>>::Output

Performs the % operation. Read more
source§

impl Rem<&u8> for Decimalwhere Decimal: Rem<u8>,

§

type Output = <Decimal as Rem<u8>>::Output

The resulting type after applying the % operator.
source§

fn rem(self, rhs: &u8) -> <Decimal as Rem<&u8>>::Output

Performs the % operation. Read more
source§

impl<'a> Rem<Decimal> for &'a Decimalwhere Decimal: Rem<Decimal>,

§

type Output = <Decimal as Rem<Decimal>>::Output

The resulting type after applying the % operator.
source§

fn rem(self, rhs: Decimal) -> <&'a Decimal as Rem<Decimal>>::Output

Performs the % operation. Read more
source§

impl Rem<Decimal> for Decimal

§

type Output = Decimal

The resulting type after applying the % operator.
source§

fn rem(self, rhs: Decimal) -> <Decimal as Rem<Decimal>>::Output

Performs the % operation. Read more
source§

impl<'a> Rem<i128> for &'a Decimalwhere Decimal: Rem<i128>,

§

type Output = <Decimal as Rem<i128>>::Output

The resulting type after applying the % operator.
source§

fn rem(self, rhs: i128) -> <&'a Decimal as Rem<i128>>::Output

Performs the % operation. Read more
source§

impl Rem<i128> for Decimal

§

type Output = Decimal

The resulting type after applying the % operator.
source§

fn rem(self, rhs: i128) -> <Decimal as Rem<i128>>::Output

Performs the % operation. Read more
source§

impl<'a> Rem<i16> for &'a Decimalwhere Decimal: Rem<i16>,

§

type Output = <Decimal as Rem<i16>>::Output

The resulting type after applying the % operator.
source§

fn rem(self, rhs: i16) -> <&'a Decimal as Rem<i16>>::Output

Performs the % operation. Read more
source§

impl Rem<i16> for Decimal

§

type Output = Decimal

The resulting type after applying the % operator.
source§

fn rem(self, rhs: i16) -> <Decimal as Rem<i16>>::Output

Performs the % operation. Read more
source§

impl<'a> Rem<i32> for &'a Decimalwhere Decimal: Rem<i32>,

§

type Output = <Decimal as Rem<i32>>::Output

The resulting type after applying the % operator.
source§

fn rem(self, rhs: i32) -> <&'a Decimal as Rem<i32>>::Output

Performs the % operation. Read more
source§

impl Rem<i32> for Decimal

§

type Output = Decimal

The resulting type after applying the % operator.
source§

fn rem(self, rhs: i32) -> <Decimal as Rem<i32>>::Output

Performs the % operation. Read more
source§

impl<'a> Rem<i64> for &'a Decimalwhere Decimal: Rem<i64>,

§

type Output = <Decimal as Rem<i64>>::Output

The resulting type after applying the % operator.
source§

fn rem(self, rhs: i64) -> <&'a Decimal as Rem<i64>>::Output

Performs the % operation. Read more
source§

impl Rem<i64> for Decimal

§

type Output = Decimal

The resulting type after applying the % operator.
source§

fn rem(self, rhs: i64) -> <Decimal as Rem<i64>>::Output

Performs the % operation. Read more
source§

impl<'a> Rem<i8> for &'a Decimalwhere Decimal: Rem<i8>,

§

type Output = <Decimal as Rem<i8>>::Output

The resulting type after applying the % operator.
source§

fn rem(self, rhs: i8) -> <&'a Decimal as Rem<i8>>::Output

Performs the % operation. Read more
source§

impl Rem<i8> for Decimal

§

type Output = Decimal

The resulting type after applying the % operator.
source§

fn rem(self, rhs: i8) -> <Decimal as Rem<i8>>::Output

Performs the % operation. Read more
source§

impl<'a> Rem<u16> for &'a Decimalwhere Decimal: Rem<u16>,

§

type Output = <Decimal as Rem<u16>>::Output

The resulting type after applying the % operator.
source§

fn rem(self, rhs: u16) -> <&'a Decimal as Rem<u16>>::Output

Performs the % operation. Read more
source§

impl Rem<u16> for Decimal

§

type Output = Decimal

The resulting type after applying the % operator.
source§

fn rem(self, rhs: u16) -> <Decimal as Rem<u16>>::Output

Performs the % operation. Read more
source§

impl<'a> Rem<u32> for &'a Decimalwhere Decimal: Rem<u32>,

§

type Output = <Decimal as Rem<u32>>::Output

The resulting type after applying the % operator.
source§

fn rem(self, rhs: u32) -> <&'a Decimal as Rem<u32>>::Output

Performs the % operation. Read more
source§

impl Rem<u32> for Decimal

§

type Output = Decimal

The resulting type after applying the % operator.
source§

fn rem(self, rhs: u32) -> <Decimal as Rem<u32>>::Output

Performs the % operation. Read more
source§

impl<'a> Rem<u64> for &'a Decimalwhere Decimal: Rem<u64>,

§

type Output = <Decimal as Rem<u64>>::Output

The resulting type after applying the % operator.
source§

fn rem(self, rhs: u64) -> <&'a Decimal as Rem<u64>>::Output

Performs the % operation. Read more
source§

impl Rem<u64> for Decimal

§

type Output = Decimal

The resulting type after applying the % operator.
source§

fn rem(self, rhs: u64) -> <Decimal as Rem<u64>>::Output

Performs the % operation. Read more
source§

impl<'a> Rem<u8> for &'a Decimalwhere Decimal: Rem<u8>,

§

type Output = <Decimal as Rem<u8>>::Output

The resulting type after applying the % operator.
source§

fn rem(self, rhs: u8) -> <&'a Decimal as Rem<u8>>::Output

Performs the % operation. Read more
source§

impl Rem<u8> for Decimal

§

type Output = Decimal

The resulting type after applying the % operator.
source§

fn rem(self, rhs: u8) -> <Decimal as Rem<u8>>::Output

Performs the % operation. Read more
source§

impl<T> RemAssign<T> for Decimalwhere Decimal: Rem<T, Output = Decimal>,

source§

fn rem_assign(&mut self, rhs: T)

Performs the %= operation. Read more
source§

impl Round for Decimal

source§

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>

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 &Decimalwhere Decimal: Sub<Decimal>,

§

type Output = <Decimal as Sub<Decimal>>::Output

The resulting type after applying the - operator.
source§

fn sub(self, rhs: &Decimal) -> <&Decimal as Sub<&Decimal>>::Output

Performs the - operation. Read more
source§

impl Sub<&Decimal> for Decimalwhere Decimal: Sub<Decimal>,

§

type Output = <Decimal as Sub<Decimal>>::Output

The resulting type after applying the - operator.
source§

fn sub(self, rhs: &Decimal) -> <Decimal as Sub<&Decimal>>::Output

Performs the - operation. Read more
source§

impl Sub<&i128> for &Decimalwhere Decimal: Sub<i128>,

§

type Output = <Decimal as Sub<i128>>::Output

The resulting type after applying the - operator.
source§

fn sub(self, rhs: &i128) -> <&Decimal as Sub<&i128>>::Output

Performs the - operation. Read more
source§

impl Sub<&i128> for Decimalwhere Decimal: Sub<i128>,

§

type Output = <Decimal as Sub<i128>>::Output

The resulting type after applying the - operator.
source§

fn sub(self, rhs: &i128) -> <Decimal as Sub<&i128>>::Output

Performs the - operation. Read more
source§

impl Sub<&i16> for &Decimalwhere Decimal: Sub<i16>,

§

type Output = <Decimal as Sub<i16>>::Output

The resulting type after applying the - operator.
source§

fn sub(self, rhs: &i16) -> <&Decimal as Sub<&i16>>::Output

Performs the - operation. Read more
source§

impl Sub<&i16> for Decimalwhere Decimal: Sub<i16>,

§

type Output = <Decimal as Sub<i16>>::Output

The resulting type after applying the - operator.
source§

fn sub(self, rhs: &i16) -> <Decimal as Sub<&i16>>::Output

Performs the - operation. Read more
source§

impl Sub<&i32> for &Decimalwhere Decimal: Sub<i32>,

§

type Output = <Decimal as Sub<i32>>::Output

The resulting type after applying the - operator.
source§

fn sub(self, rhs: &i32) -> <&Decimal as Sub<&i32>>::Output

Performs the - operation. Read more
source§

impl Sub<&i32> for Decimalwhere Decimal: Sub<i32>,

§

type Output = <Decimal as Sub<i32>>::Output

The resulting type after applying the - operator.
source§

fn sub(self, rhs: &i32) -> <Decimal as Sub<&i32>>::Output

Performs the - operation. Read more
source§

impl Sub<&i64> for &Decimalwhere Decimal: Sub<i64>,

§

type Output = <Decimal as Sub<i64>>::Output

The resulting type after applying the - operator.
source§

fn sub(self, rhs: &i64) -> <&Decimal as Sub<&i64>>::Output

Performs the - operation. Read more
source§

impl Sub<&i64> for Decimalwhere Decimal: Sub<i64>,

§

type Output = <Decimal as Sub<i64>>::Output

The resulting type after applying the - operator.
source§

fn sub(self, rhs: &i64) -> <Decimal as Sub<&i64>>::Output

Performs the - operation. Read more
source§

impl Sub<&i8> for &Decimalwhere Decimal: Sub<i8>,

§

type Output = <Decimal as Sub<i8>>::Output

The resulting type after applying the - operator.
source§

fn sub(self, rhs: &i8) -> <&Decimal as Sub<&i8>>::Output

Performs the - operation. Read more
source§

impl Sub<&i8> for Decimalwhere Decimal: Sub<i8>,

§

type Output = <Decimal as Sub<i8>>::Output

The resulting type after applying the - operator.
source§

fn sub(self, rhs: &i8) -> <Decimal as Sub<&i8>>::Output

Performs the - operation. Read more
source§

impl Sub<&u16> for &Decimalwhere Decimal: Sub<u16>,

§

type Output = <Decimal as Sub<u16>>::Output

The resulting type after applying the - operator.
source§

fn sub(self, rhs: &u16) -> <&Decimal as Sub<&u16>>::Output

Performs the - operation. Read more
source§

impl Sub<&u16> for Decimalwhere Decimal: Sub<u16>,

§

type Output = <Decimal as Sub<u16>>::Output

The resulting type after applying the - operator.
source§

fn sub(self, rhs: &u16) -> <Decimal as Sub<&u16>>::Output

Performs the - operation. Read more
source§

impl Sub<&u32> for &Decimalwhere Decimal: Sub<u32>,

§

type Output = <Decimal as Sub<u32>>::Output

The resulting type after applying the - operator.
source§

fn sub(self, rhs: &u32) -> <&Decimal as Sub<&u32>>::Output

Performs the - operation. Read more
source§

impl Sub<&u32> for Decimalwhere Decimal: Sub<u32>,

§

type Output = <Decimal as Sub<u32>>::Output

The resulting type after applying the - operator.
source§

fn sub(self, rhs: &u32) -> <Decimal as Sub<&u32>>::Output

Performs the - operation. Read more
source§

impl Sub<&u64> for &Decimalwhere Decimal: Sub<u64>,

§

type Output = <Decimal as Sub<u64>>::Output

The resulting type after applying the - operator.
source§

fn sub(self, rhs: &u64) -> <&Decimal as Sub<&u64>>::Output

Performs the - operation. Read more
source§

impl Sub<&u64> for Decimalwhere Decimal: Sub<u64>,

§

type Output = <Decimal as Sub<u64>>::Output

The resulting type after applying the - operator.
source§

fn sub(self, rhs: &u64) -> <Decimal as Sub<&u64>>::Output

Performs the - operation. Read more
source§

impl Sub<&u8> for &Decimalwhere Decimal: Sub<u8>,

§

type Output = <Decimal as Sub<u8>>::Output

The resulting type after applying the - operator.
source§

fn sub(self, rhs: &u8) -> <&Decimal as Sub<&u8>>::Output

Performs the - operation. Read more
source§

impl Sub<&u8> for Decimalwhere Decimal: Sub<u8>,

§

type Output = <Decimal as Sub<u8>>::Output

The resulting type after applying the - operator.
source§

fn sub(self, rhs: &u8) -> <Decimal as Sub<&u8>>::Output

Performs the - operation. Read more
source§

impl<'a> Sub<Decimal> for &'a Decimalwhere Decimal: Sub<Decimal>,

§

type Output = <Decimal as Sub<Decimal>>::Output

The resulting type after applying the - operator.
source§

fn sub(self, rhs: Decimal) -> <&'a Decimal as Sub<Decimal>>::Output

Performs the - operation. Read more
source§

impl Sub<Decimal> for BaseCurrency

§

type Output = BaseCurrency

The resulting type after applying the - operator.
source§

fn sub(self, rhs: Decimal) -> Self::Output

Performs the - operation. Read more
source§

impl Sub<Decimal> for Decimal

§

type Output = Decimal

The resulting type after applying the - operator.
source§

fn sub(self, rhs: Decimal) -> <Decimal as Sub<Decimal>>::Output

Performs the - operation. Read more
source§

impl Sub<Decimal> for QuoteCurrency

§

type Output = QuoteCurrency

The resulting type after applying the - operator.
source§

fn sub(self, rhs: Decimal) -> Self::Output

Performs the - operation. Read more
source§

impl<'a> Sub<i128> for &'a Decimalwhere Decimal: Sub<i128>,

§

type Output = <Decimal as Sub<i128>>::Output

The resulting type after applying the - operator.
source§

fn sub(self, rhs: i128) -> <&'a Decimal as Sub<i128>>::Output

Performs the - operation. Read more
source§

impl Sub<i128> for Decimal

§

type Output = Decimal

The resulting type after applying the - operator.
source§

fn sub(self, rhs: i128) -> <Decimal as Sub<i128>>::Output

Performs the - operation. Read more
source§

impl<'a> Sub<i16> for &'a Decimalwhere Decimal: Sub<i16>,

§

type Output = <Decimal as Sub<i16>>::Output

The resulting type after applying the - operator.
source§

fn sub(self, rhs: i16) -> <&'a Decimal as Sub<i16>>::Output

Performs the - operation. Read more
source§

impl Sub<i16> for Decimal

§

type Output = Decimal

The resulting type after applying the - operator.
source§

fn sub(self, rhs: i16) -> <Decimal as Sub<i16>>::Output

Performs the - operation. Read more
source§

impl<'a> Sub<i32> for &'a Decimalwhere Decimal: Sub<i32>,

§

type Output = <Decimal as Sub<i32>>::Output

The resulting type after applying the - operator.
source§

fn sub(self, rhs: i32) -> <&'a Decimal as Sub<i32>>::Output

Performs the - operation. Read more
source§

impl Sub<i32> for Decimal

§

type Output = Decimal

The resulting type after applying the - operator.
source§

fn sub(self, rhs: i32) -> <Decimal as Sub<i32>>::Output

Performs the - operation. Read more
source§

impl<'a> Sub<i64> for &'a Decimalwhere Decimal: Sub<i64>,

§

type Output = <Decimal as Sub<i64>>::Output

The resulting type after applying the - operator.
source§

fn sub(self, rhs: i64) -> <&'a Decimal as Sub<i64>>::Output

Performs the - operation. Read more
source§

impl Sub<i64> for Decimal

§

type Output = Decimal

The resulting type after applying the - operator.
source§

fn sub(self, rhs: i64) -> <Decimal as Sub<i64>>::Output

Performs the - operation. Read more
source§

impl<'a> Sub<i8> for &'a Decimalwhere Decimal: Sub<i8>,

§

type Output = <Decimal as Sub<i8>>::Output

The resulting type after applying the - operator.
source§

fn sub(self, rhs: i8) -> <&'a Decimal as Sub<i8>>::Output

Performs the - operation. Read more
source§

impl Sub<i8> for Decimal

§

type Output = Decimal

The resulting type after applying the - operator.
source§

fn sub(self, rhs: i8) -> <Decimal as Sub<i8>>::Output

Performs the - operation. Read more
source§

impl<'a> Sub<u16> for &'a Decimalwhere Decimal: Sub<u16>,

§

type Output = <Decimal as Sub<u16>>::Output

The resulting type after applying the - operator.
source§

fn sub(self, rhs: u16) -> <&'a Decimal as Sub<u16>>::Output

Performs the - operation. Read more
source§

impl Sub<u16> for Decimal

§

type Output = Decimal

The resulting type after applying the - operator.
source§

fn sub(self, rhs: u16) -> <Decimal as Sub<u16>>::Output

Performs the - operation. Read more
source§

impl<'a> Sub<u32> for &'a Decimalwhere Decimal: Sub<u32>,

§

type Output = <Decimal as Sub<u32>>::Output

The resulting type after applying the - operator.
source§

fn sub(self, rhs: u32) -> <&'a Decimal as Sub<u32>>::Output

Performs the - operation. Read more
source§

impl Sub<u32> for Decimal

§

type Output = Decimal

The resulting type after applying the - operator.
source§

fn sub(self, rhs: u32) -> <Decimal as Sub<u32>>::Output

Performs the - operation. Read more
source§

impl<'a> Sub<u64> for &'a Decimalwhere Decimal: Sub<u64>,

§

type Output = <Decimal as Sub<u64>>::Output

The resulting type after applying the - operator.
source§

fn sub(self, rhs: u64) -> <&'a Decimal as Sub<u64>>::Output

Performs the - operation. Read more
source§

impl Sub<u64> for Decimal

§

type Output = Decimal

The resulting type after applying the - operator.
source§

fn sub(self, rhs: u64) -> <Decimal as Sub<u64>>::Output

Performs the - operation. Read more
source§

impl<'a> Sub<u8> for &'a Decimalwhere Decimal: Sub<u8>,

§

type Output = <Decimal as Sub<u8>>::Output

The resulting type after applying the - operator.
source§

fn sub(self, rhs: u8) -> <&'a Decimal as Sub<u8>>::Output

Performs the - operation. Read more
source§

impl Sub<u8> for Decimal

§

type Output = Decimal

The resulting type after applying the - operator.
source§

fn sub(self, rhs: u8) -> <Decimal as Sub<u8>>::Output

Performs the - operation. Read more
source§

impl<T> SubAssign<T> for Decimalwhere Decimal: Sub<T, Output = Decimal>,

source§

fn sub_assign(&mut self, rhs: T)

Performs the -= operation. Read more
source§

impl TryFrom<&str> for Decimal

§

type Error = ParseDecimalError

The type returned in the event of a conversion error.
source§

fn try_from(lit: &str) -> Result<Decimal, <Decimal as TryFrom<&str>>::Error>

Performs the conversion.
source§

impl TryFrom<f32> for Decimal

source§

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

The type returned in the event of a conversion error.
source§

impl TryFrom<f64> for Decimal

source§

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");
§

type Error = DecimalError

The type returned in the event of a conversion error.
source§

impl TryFrom<u128> for Decimal

§

type Error = DecimalError

The type returned in the event of a conversion error.
source§

fn try_from(i: u128) -> Result<Decimal, <Decimal as TryFrom<u128>>::Error>

Performs the conversion.
source§

impl Copy for Decimal

source§

impl Eq for Decimal

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for Twhere T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.