Number

Struct Number 

Source
#[repr(C, packed(4))]
pub struct Number { /* private fields */ }
Expand description

High precision decimal.

Implementations§

Source§

impl Decimal

Source

pub const ZERO: Decimal

Zero value, i.e. 0.

Source

pub const ONE: Decimal

i.e. 1.

Source

pub const unsafe fn from_parts_unchecked( int_val: u128, scale: i16, negative: bool, ) -> Decimal

Creates a Decimal from parts without boundary checking.

§Safety

User have to guarantee that int_val has at most 38 tens digits and scale ranges from [-126, 130].

Source

pub const fn from_parts( int_val: u128, scale: i16, negative: bool, ) -> Result<Decimal, DecimalConvertError>

Creates a Decimal from parts.

int_val has at most 38 tens digits, scale ranges from [-126, 130].

Source

pub const fn into_parts(self) -> (u128, i16, bool)

Consumes the Decimal, returning (int_val, scale, negative).

Source

pub fn precision(&self) -> u8

Returns the precision, i.e. the count of significant digits in this decimal.

Source

pub const fn scale(&self) -> i16

Returns the scale, i.e. the count of decimal digits in the fractional part. A positive scale means a negative power of 10.

Source

pub const fn is_sign_negative(&self) -> bool

Returns true if the sign bit of the decimal is negative.

Source

pub const fn is_sign_positive(&self) -> bool

Returns true if the sign bit of the decimal is positive.

Source

pub const fn is_zero(&self) -> bool

Checks if self is zero.

Source

pub const fn abs(&self) -> Decimal

Computes the absolute value of self.

Source

pub fn encode<W>(&self, writer: W) -> Result<usize, Error>
where W: Write,

Encodes self to writer as binary bytes. Returns total size on success, which is not larger than MAX_BINARY_SIZE.

Source

pub fn compact_encode<W>(&self, writer: W) -> Result<usize, Error>
where W: Write,

Encodes self to writer as binary bytes. Returns total size on success, which is not larger than MAX_BINARY_SIZE.

The only different from Decimal::encode is it will compact encoded bytes when self is zero or small positive integer.

Source

pub fn decode(bytes: &[u8]) -> Decimal

Decodes a Decimal from binary bytes.

Source

pub fn ceil(&self) -> Decimal

Computes the smallest integer that is greater than or equal to self.

Source

pub fn floor(&self) -> Decimal

Computes the largest integer that is equal to or less than self.

Source

pub fn trunc(&self, scale: i16) -> Decimal

Truncate a value to have scale digits after the decimal point. We allow negative scale, implying a truncation before the decimal point.

Source

pub fn round(&self, scale: i16) -> Decimal

Round a value to have scale digits after the decimal point. We allow negative scale, implying rounding before the decimal point.

Source

pub fn round_with_precision(&mut self, precision: u8, scale: i16) -> bool

Do bounds checking and rounding according to precision and scale.

Returns true if overflows.

Source

pub fn normalize_to_scale(&self, scale: i16) -> Decimal

Normalize a Decimal’s scale toward specified scale.

Source

pub fn normalize(&self) -> Decimal

Normalize a Decimal’s scale toward zero.

Source

pub fn checked_add(&self, other: impl AsRef<Decimal>) -> Option<Decimal>

Add two decimals. returning None if overflow occurred.

Source

pub unsafe fn add_with_same_scale_unchecked<const DECIMAL_MODEL: u8>( &self, other: &Decimal, scale: i16, ) -> Decimal

Add two decimals.

§Safety

Make sure the decimal is zero or the scale is the same and the result is not overflow.

Source

pub unsafe fn add_with_same_scale_and_negative_unchecked<const DECIMAL_MODEL: u8>( &self, other: &Decimal, scale: i16, negative: bool, ) -> Decimal

Add two decimals.

§Safety

Make sure the follow conditions

  1. decimal is zero or the scale is the same.
  2. the result is not overflow.
  3. decimal is zero or the negative is the same.
Source

pub fn checked_sub(&self, other: impl AsRef<Decimal>) -> Option<Decimal>

Subtract one decimal from another, returning None if overflow occurred.

Source

pub unsafe fn sub_with_same_scale_unchecked<const DECIMAL_MODEL: u8>( &self, other: &Decimal, scale: i16, ) -> Decimal

Subtract one decimal from another,

§Safety

Make sure two decimal have the same scale or is zero and the result is not overflow.

Source

pub fn checked_mul(&self, other: impl AsRef<Decimal>) -> Option<Decimal>

Calculate the product of two decimals, returning None if overflow occurred.

Source

pub unsafe fn mul_unchecked<const DECIMAL_MODEL: u8>( &self, other: &Decimal, scale: i16, ) -> Decimal

Calculate the product of two decimals,

§Safety

Make sure the result scale is scale and the result is not overflow.

Source

pub fn checked_div(&self, other: impl AsRef<Decimal>) -> Option<Decimal>

Checked decimal division. Computes self / other, returning None if other == 0 or the division results in overflow.

Source

pub fn checked_rem(&self, other: impl AsRef<Decimal>) -> Option<Decimal>

Checked decimal remainder. Computes self % other, returning None if rhs == 0 or the division results in overflow.

Source

pub fn sqrt(&self) -> Option<Decimal>

Computes the square root of a decimal, returning None if self is negative or the results in overflow.

Source

pub fn simply_format<W>(&self, w: W) -> Result<(), DecimalFormatError>
where W: Write,

Formats the decimal, including sign and omitting integer zero in fractional.

Source

pub fn format_with_sci<W>( &self, max_width: u16, w: W, ) -> Result<(), DecimalFormatError>
where W: Write,

Formats the decimal, using scientific notation depending on the width.

Source

pub fn format_with_sci_forced<W>( &self, expect_scale: i16, with_zero_before_dot: bool, w: W, ) -> Result<(), DecimalFormatError>
where W: Write,

Formats the decimal, forced using scientific notation depending on the scale.

In particular, the scientific notation is also enforced for 0.
When the decimal is 0 and expect_scale greater than 0, with_zero_before_dot determines whether there is a 0 before the decimal point.

Source

pub fn format_to_hex<W>( &self, is_uppercase: bool, w: W, ) -> Result<(), DecimalFormatError>
where W: Write,

Format decimal as a hexadecimal number.

A maximum of 63 digits hexadecimal positive number are supported.

Source

pub fn format_to_json<W>(&self, w: W) -> Result<(), DecimalFormatError>
where W: Write,

Formats the decimal in the json number format, using scientific notation depending on the width.

Source

pub fn checked_pow(&self, exponent: &Decimal) -> Option<Decimal>

Raise self to the power of exponent, where self and exponent are both decimal, returning None if self == 0 at the same time exponent is negative or self is negative at the same time exponent is a fraction or the result overflowed.

Source

pub fn ln(&self) -> Option<Decimal>

Computes the natural logarithm of self, returning None if self is negative or self == 0.

Source

pub fn exp(&self) -> Option<Decimal>

Computes the nature exponential of self, returning None if the result overflowed.

Trait Implementations§

Source§

impl Add<&Decimal> for &Decimal

Source§

type Output = Decimal

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<&Decimal> for Decimal

Source§

type Output = Decimal

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<Decimal> for &Decimal

Source§

type Output = Decimal

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<f32> for &Decimal

Source§

type Output = Decimal

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<f32> for Decimal

Source§

type Output = Decimal

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<f64> for &Decimal

Source§

type Output = Decimal

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<f64> for Decimal

Source§

type Output = Decimal

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<i128> for &Decimal

Source§

type Output = Decimal

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<i128> for Decimal

Source§

type Output = Decimal

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<i16> for &Decimal

Source§

type Output = Decimal

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<i16> for Decimal

Source§

type Output = Decimal

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<i32> for &Decimal

Source§

type Output = Decimal

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<i32> for Decimal

Source§

type Output = Decimal

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<i64> for &Decimal

Source§

type Output = Decimal

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<i64> for Decimal

Source§

type Output = Decimal

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<i8> for &Decimal

Source§

type Output = Decimal

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<i8> for Decimal

Source§

type Output = Decimal

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<isize> for &Decimal

Source§

type Output = Decimal

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<isize> for Decimal

Source§

type Output = Decimal

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<u128> for &Decimal

Source§

type Output = Decimal

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<u128> for Decimal

Source§

type Output = Decimal

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<u16> for &Decimal

Source§

type Output = Decimal

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<u16> for Decimal

Source§

type Output = Decimal

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<u32> for &Decimal

Source§

type Output = Decimal

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<u32> for Decimal

Source§

type Output = Decimal

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<u64> for &Decimal

Source§

type Output = Decimal

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<u64> for Decimal

Source§

type Output = Decimal

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<u8> for &Decimal

Source§

type Output = Decimal

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<u8> for Decimal

Source§

type Output = Decimal

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<usize> for &Decimal

Source§

type Output = Decimal

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<usize> for Decimal

Source§

type Output = Decimal

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add for Decimal

Source§

type Output = Decimal

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl AddAssign<&Decimal> for &mut Decimal

Source§

fn add_assign(&mut self, other: &Decimal)

Performs the += operation. Read more
Source§

impl AddAssign<&Decimal> for Decimal

Source§

fn add_assign(&mut self, other: &Decimal)

Performs the += operation. Read more
Source§

impl AddAssign<Decimal> for &mut Decimal

Source§

fn add_assign(&mut self, other: Decimal)

Performs the += operation. Read more
Source§

impl AddAssign<f32> for &mut Decimal

Source§

fn add_assign(&mut self, other: f32)

Performs the += operation. Read more
Source§

impl AddAssign<f32> for Decimal

Source§

fn add_assign(&mut self, other: f32)

Performs the += operation. Read more
Source§

impl AddAssign<f64> for &mut Decimal

Source§

fn add_assign(&mut self, other: f64)

Performs the += operation. Read more
Source§

impl AddAssign<f64> for Decimal

Source§

fn add_assign(&mut self, other: f64)

Performs the += operation. Read more
Source§

impl AddAssign<i128> for &mut Decimal

Source§

fn add_assign(&mut self, other: i128)

Performs the += operation. Read more
Source§

impl AddAssign<i128> for Decimal

Source§

fn add_assign(&mut self, other: i128)

Performs the += operation. Read more
Source§

impl AddAssign<i16> for &mut Decimal

Source§

fn add_assign(&mut self, other: i16)

Performs the += operation. Read more
Source§

impl AddAssign<i16> for Decimal

Source§

fn add_assign(&mut self, other: i16)

Performs the += operation. Read more
Source§

impl AddAssign<i32> for &mut Decimal

Source§

fn add_assign(&mut self, other: i32)

Performs the += operation. Read more
Source§

impl AddAssign<i32> for Decimal

Source§

fn add_assign(&mut self, other: i32)

Performs the += operation. Read more
Source§

impl AddAssign<i64> for &mut Decimal

Source§

fn add_assign(&mut self, other: i64)

Performs the += operation. Read more
Source§

impl AddAssign<i64> for Decimal

Source§

fn add_assign(&mut self, other: i64)

Performs the += operation. Read more
Source§

impl AddAssign<i8> for &mut Decimal

Source§

fn add_assign(&mut self, other: i8)

Performs the += operation. Read more
Source§

impl AddAssign<i8> for Decimal

Source§

fn add_assign(&mut self, other: i8)

Performs the += operation. Read more
Source§

impl AddAssign<isize> for &mut Decimal

Source§

fn add_assign(&mut self, other: isize)

Performs the += operation. Read more
Source§

impl AddAssign<isize> for Decimal

Source§

fn add_assign(&mut self, other: isize)

Performs the += operation. Read more
Source§

impl AddAssign<u128> for &mut Decimal

Source§

fn add_assign(&mut self, other: u128)

Performs the += operation. Read more
Source§

impl AddAssign<u128> for Decimal

Source§

fn add_assign(&mut self, other: u128)

Performs the += operation. Read more
Source§

impl AddAssign<u16> for &mut Decimal

Source§

fn add_assign(&mut self, other: u16)

Performs the += operation. Read more
Source§

impl AddAssign<u16> for Decimal

Source§

fn add_assign(&mut self, other: u16)

Performs the += operation. Read more
Source§

impl AddAssign<u32> for &mut Decimal

Source§

fn add_assign(&mut self, other: u32)

Performs the += operation. Read more
Source§

impl AddAssign<u32> for Decimal

Source§

fn add_assign(&mut self, other: u32)

Performs the += operation. Read more
Source§

impl AddAssign<u64> for &mut Decimal

Source§

fn add_assign(&mut self, other: u64)

Performs the += operation. Read more
Source§

impl AddAssign<u64> for Decimal

Source§

fn add_assign(&mut self, other: u64)

Performs the += operation. Read more
Source§

impl AddAssign<u8> for &mut Decimal

Source§

fn add_assign(&mut self, other: u8)

Performs the += operation. Read more
Source§

impl AddAssign<u8> for Decimal

Source§

fn add_assign(&mut self, other: u8)

Performs the += operation. Read more
Source§

impl AddAssign<usize> for &mut Decimal

Source§

fn add_assign(&mut self, other: usize)

Performs the += operation. Read more
Source§

impl AddAssign<usize> for Decimal

Source§

fn add_assign(&mut self, other: usize)

Performs the += operation. Read more
Source§

impl AddAssign for Decimal

Source§

fn add_assign(&mut self, other: Decimal)

Performs the += operation. Read more
Source§

impl AsRef<Decimal> for Decimal

Source§

fn as_ref(&self) -> &Decimal

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl Clone for Decimal

Source§

fn clone(&self) -> Decimal

Returns a duplicate 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, f: &mut Formatter<'_>) -> Result<(), Error>

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

impl Default for Decimal

Source§

fn default() -> Decimal

Returns the “default value” for a type. Read more
Source§

impl Display for Decimal

Source§

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

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

impl Div<&Decimal> for &Decimal

Source§

type Output = Decimal

The resulting type after applying the / operator.
Source§

fn div(self, other: &Decimal) -> Decimal

Performs the / operation. Read more
Source§

impl Div<&Decimal> for Decimal

Source§

type Output = Decimal

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<Decimal> for &Decimal

Source§

type Output = Decimal

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<f32> for &Decimal

Source§

type Output = Decimal

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<f32> for Decimal

Source§

type Output = Decimal

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<f64> for &Decimal

Source§

type Output = Decimal

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<f64> for Decimal

Source§

type Output = Decimal

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<i128> for &Decimal

Source§

type Output = Decimal

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<i128> for Decimal

Source§

type Output = Decimal

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<i16> for &Decimal

Source§

type Output = Decimal

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<i16> for Decimal

Source§

type Output = Decimal

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<i32> for &Decimal

Source§

type Output = Decimal

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<i32> for Decimal

Source§

type Output = Decimal

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<i64> for &Decimal

Source§

type Output = Decimal

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<i64> for Decimal

Source§

type Output = Decimal

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<i8> for &Decimal

Source§

type Output = Decimal

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<i8> for Decimal

Source§

type Output = Decimal

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<isize> for &Decimal

Source§

type Output = Decimal

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<isize> for Decimal

Source§

type Output = Decimal

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<u128> for &Decimal

Source§

type Output = Decimal

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<u128> for Decimal

Source§

type Output = Decimal

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<u16> for &Decimal

Source§

type Output = Decimal

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<u16> for Decimal

Source§

type Output = Decimal

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<u32> for &Decimal

Source§

type Output = Decimal

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<u32> for Decimal

Source§

type Output = Decimal

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<u64> for &Decimal

Source§

type Output = Decimal

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<u64> for Decimal

Source§

type Output = Decimal

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<u8> for &Decimal

Source§

type Output = Decimal

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<u8> for Decimal

Source§

type Output = Decimal

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<usize> for &Decimal

Source§

type Output = Decimal

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<usize> for Decimal

Source§

type Output = Decimal

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div for Decimal

Source§

type Output = Decimal

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl DivAssign<&Decimal> for &mut Decimal

Source§

fn div_assign(&mut self, other: &Decimal)

Performs the /= operation. Read more
Source§

impl DivAssign<&Decimal> for Decimal

Source§

fn div_assign(&mut self, other: &Decimal)

Performs the /= operation. Read more
Source§

impl DivAssign<Decimal> for &mut Decimal

Source§

fn div_assign(&mut self, other: Decimal)

Performs the /= operation. Read more
Source§

impl DivAssign<f32> for &mut Decimal

Source§

fn div_assign(&mut self, other: f32)

Performs the /= operation. Read more
Source§

impl DivAssign<f32> for Decimal

Source§

fn div_assign(&mut self, other: f32)

Performs the /= operation. Read more
Source§

impl DivAssign<f64> for &mut Decimal

Source§

fn div_assign(&mut self, other: f64)

Performs the /= operation. Read more
Source§

impl DivAssign<f64> for Decimal

Source§

fn div_assign(&mut self, other: f64)

Performs the /= operation. Read more
Source§

impl DivAssign<i128> for &mut Decimal

Source§

fn div_assign(&mut self, other: i128)

Performs the /= operation. Read more
Source§

impl DivAssign<i128> for Decimal

Source§

fn div_assign(&mut self, other: i128)

Performs the /= operation. Read more
Source§

impl DivAssign<i16> for &mut Decimal

Source§

fn div_assign(&mut self, other: i16)

Performs the /= operation. Read more
Source§

impl DivAssign<i16> for Decimal

Source§

fn div_assign(&mut self, other: i16)

Performs the /= operation. Read more
Source§

impl DivAssign<i32> for &mut Decimal

Source§

fn div_assign(&mut self, other: i32)

Performs the /= operation. Read more
Source§

impl DivAssign<i32> for Decimal

Source§

fn div_assign(&mut self, other: i32)

Performs the /= operation. Read more
Source§

impl DivAssign<i64> for &mut Decimal

Source§

fn div_assign(&mut self, other: i64)

Performs the /= operation. Read more
Source§

impl DivAssign<i64> for Decimal

Source§

fn div_assign(&mut self, other: i64)

Performs the /= operation. Read more
Source§

impl DivAssign<i8> for &mut Decimal

Source§

fn div_assign(&mut self, other: i8)

Performs the /= operation. Read more
Source§

impl DivAssign<i8> for Decimal

Source§

fn div_assign(&mut self, other: i8)

Performs the /= operation. Read more
Source§

impl DivAssign<isize> for &mut Decimal

Source§

fn div_assign(&mut self, other: isize)

Performs the /= operation. Read more
Source§

impl DivAssign<isize> for Decimal

Source§

fn div_assign(&mut self, other: isize)

Performs the /= operation. Read more
Source§

impl DivAssign<u128> for &mut Decimal

Source§

fn div_assign(&mut self, other: u128)

Performs the /= operation. Read more
Source§

impl DivAssign<u128> for Decimal

Source§

fn div_assign(&mut self, other: u128)

Performs the /= operation. Read more
Source§

impl DivAssign<u16> for &mut Decimal

Source§

fn div_assign(&mut self, other: u16)

Performs the /= operation. Read more
Source§

impl DivAssign<u16> for Decimal

Source§

fn div_assign(&mut self, other: u16)

Performs the /= operation. Read more
Source§

impl DivAssign<u32> for &mut Decimal

Source§

fn div_assign(&mut self, other: u32)

Performs the /= operation. Read more
Source§

impl DivAssign<u32> for Decimal

Source§

fn div_assign(&mut self, other: u32)

Performs the /= operation. Read more
Source§

impl DivAssign<u64> for &mut Decimal

Source§

fn div_assign(&mut self, other: u64)

Performs the /= operation. Read more
Source§

impl DivAssign<u64> for Decimal

Source§

fn div_assign(&mut self, other: u64)

Performs the /= operation. Read more
Source§

impl DivAssign<u8> for &mut Decimal

Source§

fn div_assign(&mut self, other: u8)

Performs the /= operation. Read more
Source§

impl DivAssign<u8> for Decimal

Source§

fn div_assign(&mut self, other: u8)

Performs the /= operation. Read more
Source§

impl DivAssign<usize> for &mut Decimal

Source§

fn div_assign(&mut self, other: usize)

Performs the /= operation. Read more
Source§

impl DivAssign<usize> for Decimal

Source§

fn div_assign(&mut self, other: usize)

Performs the /= operation. Read more
Source§

impl DivAssign for Decimal

Source§

fn div_assign(&mut self, other: Decimal)

Performs the /= operation. Read more
Source§

impl From<bool> for Decimal

Source§

fn from(b: bool) -> Decimal

Converts to this type from the input type.
Source§

impl From<i16> for Decimal

Source§

fn from(val: i16) -> Decimal

Converts to this type from the input type.
Source§

impl From<i32> for Decimal

Source§

fn from(val: i32) -> Decimal

Converts to this type from the input type.
Source§

impl From<i64> for Decimal

Source§

fn from(val: i64) -> Decimal

Converts to this type from the input type.
Source§

impl From<i8> for Decimal

Source§

fn from(val: i8) -> Decimal

Converts to this type from the input type.
Source§

impl From<isize> for Decimal

Source§

fn from(val: isize) -> Decimal

Converts to this type from the input type.
Source§

impl From<u16> for Decimal

Source§

fn from(val: u16) -> Decimal

Converts to this type from the input type.
Source§

impl From<u32> for Decimal

Source§

fn from(val: u32) -> Decimal

Converts to this type from the input type.
Source§

impl From<u64> for Decimal

Source§

fn from(val: u64) -> Decimal

Converts to this type from the input type.
Source§

impl From<u8> for Decimal

Source§

fn from(val: u8) -> Decimal

Converts to this type from the input type.
Source§

impl From<usize> for Decimal

Source§

fn from(val: usize) -> Decimal

Converts to this type from the input type.
Source§

impl FromStr for Decimal

Source§

type Err = DecimalParseError

The associated error which can be returned from parsing.
Source§

fn from_str(s: &str) -> Result<Decimal, <Decimal as FromStr>::Err>

Parses a string s to return a value of this type. Read more
Source§

impl Hash for Decimal

Source§

fn hash<H>(&self, state: &mut H)
where H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Mul<&Decimal> for &Decimal

Source§

type Output = Decimal

The resulting type after applying the * operator.
Source§

fn mul(self, other: &Decimal) -> Decimal

Performs the * operation. Read more
Source§

impl Mul<&Decimal> for Decimal

Source§

type Output = Decimal

The resulting type after applying the * operator.
Source§

fn mul(self, other: &Decimal) -> <Decimal as Mul<&Decimal>>::Output

Performs the * operation. Read more
Source§

impl Mul<Decimal> for &Decimal

Source§

type Output = Decimal

The resulting type after applying the * operator.
Source§

fn mul(self, other: Decimal) -> <&Decimal as Mul<Decimal>>::Output

Performs the * operation. Read more
Source§

impl Mul<f32> for &Decimal

Source§

type Output = Decimal

The resulting type after applying the * operator.
Source§

fn mul(self, other: f32) -> <&Decimal as Mul<f32>>::Output

Performs the * operation. Read more
Source§

impl Mul<f32> for Decimal

Source§

type Output = Decimal

The resulting type after applying the * operator.
Source§

fn mul(self, other: f32) -> <Decimal as Mul<f32>>::Output

Performs the * operation. Read more
Source§

impl Mul<f64> for &Decimal

Source§

type Output = Decimal

The resulting type after applying the * operator.
Source§

fn mul(self, other: f64) -> <&Decimal as Mul<f64>>::Output

Performs the * operation. Read more
Source§

impl Mul<f64> for Decimal

Source§

type Output = Decimal

The resulting type after applying the * operator.
Source§

fn mul(self, other: f64) -> <Decimal as Mul<f64>>::Output

Performs the * operation. Read more
Source§

impl Mul<i128> for &Decimal

Source§

type Output = Decimal

The resulting type after applying the * operator.
Source§

fn mul(self, other: i128) -> <&Decimal as Mul<i128>>::Output

Performs the * operation. Read more
Source§

impl Mul<i128> for Decimal

Source§

type Output = Decimal

The resulting type after applying the * operator.
Source§

fn mul(self, other: i128) -> <Decimal as Mul<i128>>::Output

Performs the * operation. Read more
Source§

impl Mul<i16> for &Decimal

Source§

type Output = Decimal

The resulting type after applying the * operator.
Source§

fn mul(self, other: i16) -> <&Decimal as Mul<i16>>::Output

Performs the * operation. Read more
Source§

impl Mul<i16> for Decimal

Source§

type Output = Decimal

The resulting type after applying the * operator.
Source§

fn mul(self, other: i16) -> <Decimal as Mul<i16>>::Output

Performs the * operation. Read more
Source§

impl Mul<i32> for &Decimal

Source§

type Output = Decimal

The resulting type after applying the * operator.
Source§

fn mul(self, other: i32) -> <&Decimal as Mul<i32>>::Output

Performs the * operation. Read more
Source§

impl Mul<i32> for Decimal

Source§

type Output = Decimal

The resulting type after applying the * operator.
Source§

fn mul(self, other: i32) -> <Decimal as Mul<i32>>::Output

Performs the * operation. Read more
Source§

impl Mul<i64> for &Decimal

Source§

type Output = Decimal

The resulting type after applying the * operator.
Source§

fn mul(self, other: i64) -> <&Decimal as Mul<i64>>::Output

Performs the * operation. Read more
Source§

impl Mul<i64> for Decimal

Source§

type Output = Decimal

The resulting type after applying the * operator.
Source§

fn mul(self, other: i64) -> <Decimal as Mul<i64>>::Output

Performs the * operation. Read more
Source§

impl Mul<i8> for &Decimal

Source§

type Output = Decimal

The resulting type after applying the * operator.
Source§

fn mul(self, other: i8) -> <&Decimal as Mul<i8>>::Output

Performs the * operation. Read more
Source§

impl Mul<i8> for Decimal

Source§

type Output = Decimal

The resulting type after applying the * operator.
Source§

fn mul(self, other: i8) -> <Decimal as Mul<i8>>::Output

Performs the * operation. Read more
Source§

impl Mul<isize> for &Decimal

Source§

type Output = Decimal

The resulting type after applying the * operator.
Source§

fn mul(self, other: isize) -> <&Decimal as Mul<isize>>::Output

Performs the * operation. Read more
Source§

impl Mul<isize> for Decimal

Source§

type Output = Decimal

The resulting type after applying the * operator.
Source§

fn mul(self, other: isize) -> <Decimal as Mul<isize>>::Output

Performs the * operation. Read more
Source§

impl Mul<u128> for &Decimal

Source§

type Output = Decimal

The resulting type after applying the * operator.
Source§

fn mul(self, other: u128) -> <&Decimal as Mul<u128>>::Output

Performs the * operation. Read more
Source§

impl Mul<u128> for Decimal

Source§

type Output = Decimal

The resulting type after applying the * operator.
Source§

fn mul(self, other: u128) -> <Decimal as Mul<u128>>::Output

Performs the * operation. Read more
Source§

impl Mul<u16> for &Decimal

Source§

type Output = Decimal

The resulting type after applying the * operator.
Source§

fn mul(self, other: u16) -> <&Decimal as Mul<u16>>::Output

Performs the * operation. Read more
Source§

impl Mul<u16> for Decimal

Source§

type Output = Decimal

The resulting type after applying the * operator.
Source§

fn mul(self, other: u16) -> <Decimal as Mul<u16>>::Output

Performs the * operation. Read more
Source§

impl Mul<u32> for &Decimal

Source§

type Output = Decimal

The resulting type after applying the * operator.
Source§

fn mul(self, other: u32) -> <&Decimal as Mul<u32>>::Output

Performs the * operation. Read more
Source§

impl Mul<u32> for Decimal

Source§

type Output = Decimal

The resulting type after applying the * operator.
Source§

fn mul(self, other: u32) -> <Decimal as Mul<u32>>::Output

Performs the * operation. Read more
Source§

impl Mul<u64> for &Decimal

Source§

type Output = Decimal

The resulting type after applying the * operator.
Source§

fn mul(self, other: u64) -> <&Decimal as Mul<u64>>::Output

Performs the * operation. Read more
Source§

impl Mul<u64> for Decimal

Source§

type Output = Decimal

The resulting type after applying the * operator.
Source§

fn mul(self, other: u64) -> <Decimal as Mul<u64>>::Output

Performs the * operation. Read more
Source§

impl Mul<u8> for &Decimal

Source§

type Output = Decimal

The resulting type after applying the * operator.
Source§

fn mul(self, other: u8) -> <&Decimal as Mul<u8>>::Output

Performs the * operation. Read more
Source§

impl Mul<u8> for Decimal

Source§

type Output = Decimal

The resulting type after applying the * operator.
Source§

fn mul(self, other: u8) -> <Decimal as Mul<u8>>::Output

Performs the * operation. Read more
Source§

impl Mul<usize> for &Decimal

Source§

type Output = Decimal

The resulting type after applying the * operator.
Source§

fn mul(self, other: usize) -> <&Decimal as Mul<usize>>::Output

Performs the * operation. Read more
Source§

impl Mul<usize> for Decimal

Source§

type Output = Decimal

The resulting type after applying the * operator.
Source§

fn mul(self, other: usize) -> <Decimal as Mul<usize>>::Output

Performs the * operation. Read more
Source§

impl Mul for Decimal

Source§

type Output = Decimal

The resulting type after applying the * operator.
Source§

fn mul(self, other: Decimal) -> <Decimal as Mul>::Output

Performs the * operation. Read more
Source§

impl MulAssign<&Decimal> for &mut Decimal

Source§

fn mul_assign(&mut self, other: &Decimal)

Performs the *= operation. Read more
Source§

impl MulAssign<&Decimal> for Decimal

Source§

fn mul_assign(&mut self, other: &Decimal)

Performs the *= operation. Read more
Source§

impl MulAssign<Decimal> for &mut Decimal

Source§

fn mul_assign(&mut self, other: Decimal)

Performs the *= operation. Read more
Source§

impl MulAssign<f32> for &mut Decimal

Source§

fn mul_assign(&mut self, other: f32)

Performs the *= operation. Read more
Source§

impl MulAssign<f32> for Decimal

Source§

fn mul_assign(&mut self, other: f32)

Performs the *= operation. Read more
Source§

impl MulAssign<f64> for &mut Decimal

Source§

fn mul_assign(&mut self, other: f64)

Performs the *= operation. Read more
Source§

impl MulAssign<f64> for Decimal

Source§

fn mul_assign(&mut self, other: f64)

Performs the *= operation. Read more
Source§

impl MulAssign<i128> for &mut Decimal

Source§

fn mul_assign(&mut self, other: i128)

Performs the *= operation. Read more
Source§

impl MulAssign<i128> for Decimal

Source§

fn mul_assign(&mut self, other: i128)

Performs the *= operation. Read more
Source§

impl MulAssign<i16> for &mut Decimal

Source§

fn mul_assign(&mut self, other: i16)

Performs the *= operation. Read more
Source§

impl MulAssign<i16> for Decimal

Source§

fn mul_assign(&mut self, other: i16)

Performs the *= operation. Read more
Source§

impl MulAssign<i32> for &mut Decimal

Source§

fn mul_assign(&mut self, other: i32)

Performs the *= operation. Read more
Source§

impl MulAssign<i32> for Decimal

Source§

fn mul_assign(&mut self, other: i32)

Performs the *= operation. Read more
Source§

impl MulAssign<i64> for &mut Decimal

Source§

fn mul_assign(&mut self, other: i64)

Performs the *= operation. Read more
Source§

impl MulAssign<i64> for Decimal

Source§

fn mul_assign(&mut self, other: i64)

Performs the *= operation. Read more
Source§

impl MulAssign<i8> for &mut Decimal

Source§

fn mul_assign(&mut self, other: i8)

Performs the *= operation. Read more
Source§

impl MulAssign<i8> for Decimal

Source§

fn mul_assign(&mut self, other: i8)

Performs the *= operation. Read more
Source§

impl MulAssign<isize> for &mut Decimal

Source§

fn mul_assign(&mut self, other: isize)

Performs the *= operation. Read more
Source§

impl MulAssign<isize> for Decimal

Source§

fn mul_assign(&mut self, other: isize)

Performs the *= operation. Read more
Source§

impl MulAssign<u128> for &mut Decimal

Source§

fn mul_assign(&mut self, other: u128)

Performs the *= operation. Read more
Source§

impl MulAssign<u128> for Decimal

Source§

fn mul_assign(&mut self, other: u128)

Performs the *= operation. Read more
Source§

impl MulAssign<u16> for &mut Decimal

Source§

fn mul_assign(&mut self, other: u16)

Performs the *= operation. Read more
Source§

impl MulAssign<u16> for Decimal

Source§

fn mul_assign(&mut self, other: u16)

Performs the *= operation. Read more
Source§

impl MulAssign<u32> for &mut Decimal

Source§

fn mul_assign(&mut self, other: u32)

Performs the *= operation. Read more
Source§

impl MulAssign<u32> for Decimal

Source§

fn mul_assign(&mut self, other: u32)

Performs the *= operation. Read more
Source§

impl MulAssign<u64> for &mut Decimal

Source§

fn mul_assign(&mut self, other: u64)

Performs the *= operation. Read more
Source§

impl MulAssign<u64> for Decimal

Source§

fn mul_assign(&mut self, other: u64)

Performs the *= operation. Read more
Source§

impl MulAssign<u8> for &mut Decimal

Source§

fn mul_assign(&mut self, other: u8)

Performs the *= operation. Read more
Source§

impl MulAssign<u8> for Decimal

Source§

fn mul_assign(&mut self, other: u8)

Performs the *= operation. Read more
Source§

impl MulAssign<usize> for &mut Decimal

Source§

fn mul_assign(&mut self, other: usize)

Performs the *= operation. Read more
Source§

impl MulAssign<usize> for Decimal

Source§

fn mul_assign(&mut self, other: usize)

Performs the *= operation. Read more
Source§

impl MulAssign for Decimal

Source§

fn mul_assign(&mut self, other: Decimal)

Performs the *= operation. Read more
Source§

impl Neg for &Decimal

Source§

type Output = Decimal

The resulting type after applying the - operator.
Source§

fn neg(self) -> <&Decimal as Neg>::Output

Performs the unary - operation. Read more
Source§

impl Neg for Decimal

Source§

type Output = Decimal

The resulting type after applying the - operator.
Source§

fn neg(self) -> <Decimal as Neg>::Output

Performs the unary - operation. Read more
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) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq<&Decimal> for Decimal

Source§

fn eq(&self, other: &&Decimal) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<Decimal> for &Decimal

Source§

fn eq(&self, other: &Decimal) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq for Decimal

Source§

fn eq(&self, other: &Decimal) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

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

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

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

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
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

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

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

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl PartialOrd 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

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

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

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<'a> Product<&'a Decimal> for Decimal

Source§

fn product<I>(iter: I) -> Decimal
where I: Iterator<Item = &'a Decimal>,

Takes an iterator and generates Self from the elements by multiplying the items.
Source§

impl Product for Decimal

Source§

fn product<I>(iter: I) -> Decimal
where I: Iterator<Item = Decimal>,

Takes an iterator and generates Self from the elements by multiplying the items.
Source§

impl Rem<&Decimal> for &Decimal

Source§

type Output = Decimal

The resulting type after applying the % operator.
Source§

fn rem(self, other: &Decimal) -> Decimal

Performs the % operation. Read more
Source§

impl Rem<&Decimal> for Decimal

Source§

type Output = Decimal

The resulting type after applying the % operator.
Source§

fn rem(self, other: &Decimal) -> <Decimal as Rem<&Decimal>>::Output

Performs the % operation. Read more
Source§

impl Rem<Decimal> for &Decimal

Source§

type Output = Decimal

The resulting type after applying the % operator.
Source§

fn rem(self, other: Decimal) -> <&Decimal as Rem<Decimal>>::Output

Performs the % operation. Read more
Source§

impl Rem<f32> for &Decimal

Source§

type Output = Decimal

The resulting type after applying the % operator.
Source§

fn rem(self, other: f32) -> <&Decimal as Rem<f32>>::Output

Performs the % operation. Read more
Source§

impl Rem<f32> for Decimal

Source§

type Output = Decimal

The resulting type after applying the % operator.
Source§

fn rem(self, other: f32) -> <Decimal as Rem<f32>>::Output

Performs the % operation. Read more
Source§

impl Rem<f64> for &Decimal

Source§

type Output = Decimal

The resulting type after applying the % operator.
Source§

fn rem(self, other: f64) -> <&Decimal as Rem<f64>>::Output

Performs the % operation. Read more
Source§

impl Rem<f64> for Decimal

Source§

type Output = Decimal

The resulting type after applying the % operator.
Source§

fn rem(self, other: f64) -> <Decimal as Rem<f64>>::Output

Performs the % operation. Read more
Source§

impl Rem<i128> for &Decimal

Source§

type Output = Decimal

The resulting type after applying the % operator.
Source§

fn rem(self, other: i128) -> <&Decimal as Rem<i128>>::Output

Performs the % operation. Read more
Source§

impl Rem<i128> for Decimal

Source§

type Output = Decimal

The resulting type after applying the % operator.
Source§

fn rem(self, other: i128) -> <Decimal as Rem<i128>>::Output

Performs the % operation. Read more
Source§

impl Rem<i16> for &Decimal

Source§

type Output = Decimal

The resulting type after applying the % operator.
Source§

fn rem(self, other: i16) -> <&Decimal as Rem<i16>>::Output

Performs the % operation. Read more
Source§

impl Rem<i16> for Decimal

Source§

type Output = Decimal

The resulting type after applying the % operator.
Source§

fn rem(self, other: i16) -> <Decimal as Rem<i16>>::Output

Performs the % operation. Read more
Source§

impl Rem<i32> for &Decimal

Source§

type Output = Decimal

The resulting type after applying the % operator.
Source§

fn rem(self, other: i32) -> <&Decimal as Rem<i32>>::Output

Performs the % operation. Read more
Source§

impl Rem<i32> for Decimal

Source§

type Output = Decimal

The resulting type after applying the % operator.
Source§

fn rem(self, other: i32) -> <Decimal as Rem<i32>>::Output

Performs the % operation. Read more
Source§

impl Rem<i64> for &Decimal

Source§

type Output = Decimal

The resulting type after applying the % operator.
Source§

fn rem(self, other: i64) -> <&Decimal as Rem<i64>>::Output

Performs the % operation. Read more
Source§

impl Rem<i64> for Decimal

Source§

type Output = Decimal

The resulting type after applying the % operator.
Source§

fn rem(self, other: i64) -> <Decimal as Rem<i64>>::Output

Performs the % operation. Read more
Source§

impl Rem<i8> for &Decimal

Source§

type Output = Decimal

The resulting type after applying the % operator.
Source§

fn rem(self, other: i8) -> <&Decimal as Rem<i8>>::Output

Performs the % operation. Read more
Source§

impl Rem<i8> for Decimal

Source§

type Output = Decimal

The resulting type after applying the % operator.
Source§

fn rem(self, other: i8) -> <Decimal as Rem<i8>>::Output

Performs the % operation. Read more
Source§

impl Rem<isize> for &Decimal

Source§

type Output = Decimal

The resulting type after applying the % operator.
Source§

fn rem(self, other: isize) -> <&Decimal as Rem<isize>>::Output

Performs the % operation. Read more
Source§

impl Rem<isize> for Decimal

Source§

type Output = Decimal

The resulting type after applying the % operator.
Source§

fn rem(self, other: isize) -> <Decimal as Rem<isize>>::Output

Performs the % operation. Read more
Source§

impl Rem<u128> for &Decimal

Source§

type Output = Decimal

The resulting type after applying the % operator.
Source§

fn rem(self, other: u128) -> <&Decimal as Rem<u128>>::Output

Performs the % operation. Read more
Source§

impl Rem<u128> for Decimal

Source§

type Output = Decimal

The resulting type after applying the % operator.
Source§

fn rem(self, other: u128) -> <Decimal as Rem<u128>>::Output

Performs the % operation. Read more
Source§

impl Rem<u16> for &Decimal

Source§

type Output = Decimal

The resulting type after applying the % operator.
Source§

fn rem(self, other: u16) -> <&Decimal as Rem<u16>>::Output

Performs the % operation. Read more
Source§

impl Rem<u16> for Decimal

Source§

type Output = Decimal

The resulting type after applying the % operator.
Source§

fn rem(self, other: u16) -> <Decimal as Rem<u16>>::Output

Performs the % operation. Read more
Source§

impl Rem<u32> for &Decimal

Source§

type Output = Decimal

The resulting type after applying the % operator.
Source§

fn rem(self, other: u32) -> <&Decimal as Rem<u32>>::Output

Performs the % operation. Read more
Source§

impl Rem<u32> for Decimal

Source§

type Output = Decimal

The resulting type after applying the % operator.
Source§

fn rem(self, other: u32) -> <Decimal as Rem<u32>>::Output

Performs the % operation. Read more
Source§

impl Rem<u64> for &Decimal

Source§

type Output = Decimal

The resulting type after applying the % operator.
Source§

fn rem(self, other: u64) -> <&Decimal as Rem<u64>>::Output

Performs the % operation. Read more
Source§

impl Rem<u64> for Decimal

Source§

type Output = Decimal

The resulting type after applying the % operator.
Source§

fn rem(self, other: u64) -> <Decimal as Rem<u64>>::Output

Performs the % operation. Read more
Source§

impl Rem<u8> for &Decimal

Source§

type Output = Decimal

The resulting type after applying the % operator.
Source§

fn rem(self, other: u8) -> <&Decimal as Rem<u8>>::Output

Performs the % operation. Read more
Source§

impl Rem<u8> for Decimal

Source§

type Output = Decimal

The resulting type after applying the % operator.
Source§

fn rem(self, other: u8) -> <Decimal as Rem<u8>>::Output

Performs the % operation. Read more
Source§

impl Rem<usize> for &Decimal

Source§

type Output = Decimal

The resulting type after applying the % operator.
Source§

fn rem(self, other: usize) -> <&Decimal as Rem<usize>>::Output

Performs the % operation. Read more
Source§

impl Rem<usize> for Decimal

Source§

type Output = Decimal

The resulting type after applying the % operator.
Source§

fn rem(self, other: usize) -> <Decimal as Rem<usize>>::Output

Performs the % operation. Read more
Source§

impl Rem for Decimal

Source§

type Output = Decimal

The resulting type after applying the % operator.
Source§

fn rem(self, other: Decimal) -> <Decimal as Rem>::Output

Performs the % operation. Read more
Source§

impl RemAssign<&Decimal> for &mut Decimal

Source§

fn rem_assign(&mut self, other: &Decimal)

Performs the %= operation. Read more
Source§

impl RemAssign<&Decimal> for Decimal

Source§

fn rem_assign(&mut self, other: &Decimal)

Performs the %= operation. Read more
Source§

impl RemAssign<Decimal> for &mut Decimal

Source§

fn rem_assign(&mut self, other: Decimal)

Performs the %= operation. Read more
Source§

impl RemAssign<f32> for &mut Decimal

Source§

fn rem_assign(&mut self, other: f32)

Performs the %= operation. Read more
Source§

impl RemAssign<f32> for Decimal

Source§

fn rem_assign(&mut self, other: f32)

Performs the %= operation. Read more
Source§

impl RemAssign<f64> for &mut Decimal

Source§

fn rem_assign(&mut self, other: f64)

Performs the %= operation. Read more
Source§

impl RemAssign<f64> for Decimal

Source§

fn rem_assign(&mut self, other: f64)

Performs the %= operation. Read more
Source§

impl RemAssign<i128> for &mut Decimal

Source§

fn rem_assign(&mut self, other: i128)

Performs the %= operation. Read more
Source§

impl RemAssign<i128> for Decimal

Source§

fn rem_assign(&mut self, other: i128)

Performs the %= operation. Read more
Source§

impl RemAssign<i16> for &mut Decimal

Source§

fn rem_assign(&mut self, other: i16)

Performs the %= operation. Read more
Source§

impl RemAssign<i16> for Decimal

Source§

fn rem_assign(&mut self, other: i16)

Performs the %= operation. Read more
Source§

impl RemAssign<i32> for &mut Decimal

Source§

fn rem_assign(&mut self, other: i32)

Performs the %= operation. Read more
Source§

impl RemAssign<i32> for Decimal

Source§

fn rem_assign(&mut self, other: i32)

Performs the %= operation. Read more
Source§

impl RemAssign<i64> for &mut Decimal

Source§

fn rem_assign(&mut self, other: i64)

Performs the %= operation. Read more
Source§

impl RemAssign<i64> for Decimal

Source§

fn rem_assign(&mut self, other: i64)

Performs the %= operation. Read more
Source§

impl RemAssign<i8> for &mut Decimal

Source§

fn rem_assign(&mut self, other: i8)

Performs the %= operation. Read more
Source§

impl RemAssign<i8> for Decimal

Source§

fn rem_assign(&mut self, other: i8)

Performs the %= operation. Read more
Source§

impl RemAssign<isize> for &mut Decimal

Source§

fn rem_assign(&mut self, other: isize)

Performs the %= operation. Read more
Source§

impl RemAssign<isize> for Decimal

Source§

fn rem_assign(&mut self, other: isize)

Performs the %= operation. Read more
Source§

impl RemAssign<u128> for &mut Decimal

Source§

fn rem_assign(&mut self, other: u128)

Performs the %= operation. Read more
Source§

impl RemAssign<u128> for Decimal

Source§

fn rem_assign(&mut self, other: u128)

Performs the %= operation. Read more
Source§

impl RemAssign<u16> for &mut Decimal

Source§

fn rem_assign(&mut self, other: u16)

Performs the %= operation. Read more
Source§

impl RemAssign<u16> for Decimal

Source§

fn rem_assign(&mut self, other: u16)

Performs the %= operation. Read more
Source§

impl RemAssign<u32> for &mut Decimal

Source§

fn rem_assign(&mut self, other: u32)

Performs the %= operation. Read more
Source§

impl RemAssign<u32> for Decimal

Source§

fn rem_assign(&mut self, other: u32)

Performs the %= operation. Read more
Source§

impl RemAssign<u64> for &mut Decimal

Source§

fn rem_assign(&mut self, other: u64)

Performs the %= operation. Read more
Source§

impl RemAssign<u64> for Decimal

Source§

fn rem_assign(&mut self, other: u64)

Performs the %= operation. Read more
Source§

impl RemAssign<u8> for &mut Decimal

Source§

fn rem_assign(&mut self, other: u8)

Performs the %= operation. Read more
Source§

impl RemAssign<u8> for Decimal

Source§

fn rem_assign(&mut self, other: u8)

Performs the %= operation. Read more
Source§

impl RemAssign<usize> for &mut Decimal

Source§

fn rem_assign(&mut self, other: usize)

Performs the %= operation. Read more
Source§

impl RemAssign<usize> for Decimal

Source§

fn rem_assign(&mut self, other: usize)

Performs the %= operation. Read more
Source§

impl RemAssign for Decimal

Source§

fn rem_assign(&mut self, other: Decimal)

Performs the %= operation. Read more
Source§

impl Sub<&Decimal> for &Decimal

Source§

type Output = Decimal

The resulting type after applying the - operator.
Source§

fn sub(self, other: &Decimal) -> Decimal

Performs the - operation. Read more
Source§

impl Sub<&Decimal> for Decimal

Source§

type Output = Decimal

The resulting type after applying the - operator.
Source§

fn sub(self, other: &Decimal) -> <Decimal as Sub<&Decimal>>::Output

Performs the - operation. Read more
Source§

impl Sub<Decimal> for &Decimal

Source§

type Output = Decimal

The resulting type after applying the - operator.
Source§

fn sub(self, other: Decimal) -> <&Decimal as Sub<Decimal>>::Output

Performs the - operation. Read more
Source§

impl Sub<f32> for &Decimal

Source§

type Output = Decimal

The resulting type after applying the - operator.
Source§

fn sub(self, other: f32) -> <&Decimal as Sub<f32>>::Output

Performs the - operation. Read more
Source§

impl Sub<f32> for Decimal

Source§

type Output = Decimal

The resulting type after applying the - operator.
Source§

fn sub(self, other: f32) -> <Decimal as Sub<f32>>::Output

Performs the - operation. Read more
Source§

impl Sub<f64> for &Decimal

Source§

type Output = Decimal

The resulting type after applying the - operator.
Source§

fn sub(self, other: f64) -> <&Decimal as Sub<f64>>::Output

Performs the - operation. Read more
Source§

impl Sub<f64> for Decimal

Source§

type Output = Decimal

The resulting type after applying the - operator.
Source§

fn sub(self, other: f64) -> <Decimal as Sub<f64>>::Output

Performs the - operation. Read more
Source§

impl Sub<i128> for &Decimal

Source§

type Output = Decimal

The resulting type after applying the - operator.
Source§

fn sub(self, other: i128) -> <&Decimal as Sub<i128>>::Output

Performs the - operation. Read more
Source§

impl Sub<i128> for Decimal

Source§

type Output = Decimal

The resulting type after applying the - operator.
Source§

fn sub(self, other: i128) -> <Decimal as Sub<i128>>::Output

Performs the - operation. Read more
Source§

impl Sub<i16> for &Decimal

Source§

type Output = Decimal

The resulting type after applying the - operator.
Source§

fn sub(self, other: i16) -> <&Decimal as Sub<i16>>::Output

Performs the - operation. Read more
Source§

impl Sub<i16> for Decimal

Source§

type Output = Decimal

The resulting type after applying the - operator.
Source§

fn sub(self, other: i16) -> <Decimal as Sub<i16>>::Output

Performs the - operation. Read more
Source§

impl Sub<i32> for &Decimal

Source§

type Output = Decimal

The resulting type after applying the - operator.
Source§

fn sub(self, other: i32) -> <&Decimal as Sub<i32>>::Output

Performs the - operation. Read more
Source§

impl Sub<i32> for Decimal

Source§

type Output = Decimal

The resulting type after applying the - operator.
Source§

fn sub(self, other: i32) -> <Decimal as Sub<i32>>::Output

Performs the - operation. Read more
Source§

impl Sub<i64> for &Decimal

Source§

type Output = Decimal

The resulting type after applying the - operator.
Source§

fn sub(self, other: i64) -> <&Decimal as Sub<i64>>::Output

Performs the - operation. Read more
Source§

impl Sub<i64> for Decimal

Source§

type Output = Decimal

The resulting type after applying the - operator.
Source§

fn sub(self, other: i64) -> <Decimal as Sub<i64>>::Output

Performs the - operation. Read more
Source§

impl Sub<i8> for &Decimal

Source§

type Output = Decimal

The resulting type after applying the - operator.
Source§

fn sub(self, other: i8) -> <&Decimal as Sub<i8>>::Output

Performs the - operation. Read more
Source§

impl Sub<i8> for Decimal

Source§

type Output = Decimal

The resulting type after applying the - operator.
Source§

fn sub(self, other: i8) -> <Decimal as Sub<i8>>::Output

Performs the - operation. Read more
Source§

impl Sub<isize> for &Decimal

Source§

type Output = Decimal

The resulting type after applying the - operator.
Source§

fn sub(self, other: isize) -> <&Decimal as Sub<isize>>::Output

Performs the - operation. Read more
Source§

impl Sub<isize> for Decimal

Source§

type Output = Decimal

The resulting type after applying the - operator.
Source§

fn sub(self, other: isize) -> <Decimal as Sub<isize>>::Output

Performs the - operation. Read more
Source§

impl Sub<u128> for &Decimal

Source§

type Output = Decimal

The resulting type after applying the - operator.
Source§

fn sub(self, other: u128) -> <&Decimal as Sub<u128>>::Output

Performs the - operation. Read more
Source§

impl Sub<u128> for Decimal

Source§

type Output = Decimal

The resulting type after applying the - operator.
Source§

fn sub(self, other: u128) -> <Decimal as Sub<u128>>::Output

Performs the - operation. Read more
Source§

impl Sub<u16> for &Decimal

Source§

type Output = Decimal

The resulting type after applying the - operator.
Source§

fn sub(self, other: u16) -> <&Decimal as Sub<u16>>::Output

Performs the - operation. Read more
Source§

impl Sub<u16> for Decimal

Source§

type Output = Decimal

The resulting type after applying the - operator.
Source§

fn sub(self, other: u16) -> <Decimal as Sub<u16>>::Output

Performs the - operation. Read more
Source§

impl Sub<u32> for &Decimal

Source§

type Output = Decimal

The resulting type after applying the - operator.
Source§

fn sub(self, other: u32) -> <&Decimal as Sub<u32>>::Output

Performs the - operation. Read more
Source§

impl Sub<u32> for Decimal

Source§

type Output = Decimal

The resulting type after applying the - operator.
Source§

fn sub(self, other: u32) -> <Decimal as Sub<u32>>::Output

Performs the - operation. Read more
Source§

impl Sub<u64> for &Decimal

Source§

type Output = Decimal

The resulting type after applying the - operator.
Source§

fn sub(self, other: u64) -> <&Decimal as Sub<u64>>::Output

Performs the - operation. Read more
Source§

impl Sub<u64> for Decimal

Source§

type Output = Decimal

The resulting type after applying the - operator.
Source§

fn sub(self, other: u64) -> <Decimal as Sub<u64>>::Output

Performs the - operation. Read more
Source§

impl Sub<u8> for &Decimal

Source§

type Output = Decimal

The resulting type after applying the - operator.
Source§

fn sub(self, other: u8) -> <&Decimal as Sub<u8>>::Output

Performs the - operation. Read more
Source§

impl Sub<u8> for Decimal

Source§

type Output = Decimal

The resulting type after applying the - operator.
Source§

fn sub(self, other: u8) -> <Decimal as Sub<u8>>::Output

Performs the - operation. Read more
Source§

impl Sub<usize> for &Decimal

Source§

type Output = Decimal

The resulting type after applying the - operator.
Source§

fn sub(self, other: usize) -> <&Decimal as Sub<usize>>::Output

Performs the - operation. Read more
Source§

impl Sub<usize> for Decimal

Source§

type Output = Decimal

The resulting type after applying the - operator.
Source§

fn sub(self, other: usize) -> <Decimal as Sub<usize>>::Output

Performs the - operation. Read more
Source§

impl Sub for Decimal

Source§

type Output = Decimal

The resulting type after applying the - operator.
Source§

fn sub(self, other: Decimal) -> <Decimal as Sub>::Output

Performs the - operation. Read more
Source§

impl SubAssign<&Decimal> for &mut Decimal

Source§

fn sub_assign(&mut self, other: &Decimal)

Performs the -= operation. Read more
Source§

impl SubAssign<&Decimal> for Decimal

Source§

fn sub_assign(&mut self, other: &Decimal)

Performs the -= operation. Read more
Source§

impl SubAssign<Decimal> for &mut Decimal

Source§

fn sub_assign(&mut self, other: Decimal)

Performs the -= operation. Read more
Source§

impl SubAssign<f32> for &mut Decimal

Source§

fn sub_assign(&mut self, other: f32)

Performs the -= operation. Read more
Source§

impl SubAssign<f32> for Decimal

Source§

fn sub_assign(&mut self, other: f32)

Performs the -= operation. Read more
Source§

impl SubAssign<f64> for &mut Decimal

Source§

fn sub_assign(&mut self, other: f64)

Performs the -= operation. Read more
Source§

impl SubAssign<f64> for Decimal

Source§

fn sub_assign(&mut self, other: f64)

Performs the -= operation. Read more
Source§

impl SubAssign<i128> for &mut Decimal

Source§

fn sub_assign(&mut self, other: i128)

Performs the -= operation. Read more
Source§

impl SubAssign<i128> for Decimal

Source§

fn sub_assign(&mut self, other: i128)

Performs the -= operation. Read more
Source§

impl SubAssign<i16> for &mut Decimal

Source§

fn sub_assign(&mut self, other: i16)

Performs the -= operation. Read more
Source§

impl SubAssign<i16> for Decimal

Source§

fn sub_assign(&mut self, other: i16)

Performs the -= operation. Read more
Source§

impl SubAssign<i32> for &mut Decimal

Source§

fn sub_assign(&mut self, other: i32)

Performs the -= operation. Read more
Source§

impl SubAssign<i32> for Decimal

Source§

fn sub_assign(&mut self, other: i32)

Performs the -= operation. Read more
Source§

impl SubAssign<i64> for &mut Decimal

Source§

fn sub_assign(&mut self, other: i64)

Performs the -= operation. Read more
Source§

impl SubAssign<i64> for Decimal

Source§

fn sub_assign(&mut self, other: i64)

Performs the -= operation. Read more
Source§

impl SubAssign<i8> for &mut Decimal

Source§

fn sub_assign(&mut self, other: i8)

Performs the -= operation. Read more
Source§

impl SubAssign<i8> for Decimal

Source§

fn sub_assign(&mut self, other: i8)

Performs the -= operation. Read more
Source§

impl SubAssign<isize> for &mut Decimal

Source§

fn sub_assign(&mut self, other: isize)

Performs the -= operation. Read more
Source§

impl SubAssign<isize> for Decimal

Source§

fn sub_assign(&mut self, other: isize)

Performs the -= operation. Read more
Source§

impl SubAssign<u128> for &mut Decimal

Source§

fn sub_assign(&mut self, other: u128)

Performs the -= operation. Read more
Source§

impl SubAssign<u128> for Decimal

Source§

fn sub_assign(&mut self, other: u128)

Performs the -= operation. Read more
Source§

impl SubAssign<u16> for &mut Decimal

Source§

fn sub_assign(&mut self, other: u16)

Performs the -= operation. Read more
Source§

impl SubAssign<u16> for Decimal

Source§

fn sub_assign(&mut self, other: u16)

Performs the -= operation. Read more
Source§

impl SubAssign<u32> for &mut Decimal

Source§

fn sub_assign(&mut self, other: u32)

Performs the -= operation. Read more
Source§

impl SubAssign<u32> for Decimal

Source§

fn sub_assign(&mut self, other: u32)

Performs the -= operation. Read more
Source§

impl SubAssign<u64> for &mut Decimal

Source§

fn sub_assign(&mut self, other: u64)

Performs the -= operation. Read more
Source§

impl SubAssign<u64> for Decimal

Source§

fn sub_assign(&mut self, other: u64)

Performs the -= operation. Read more
Source§

impl SubAssign<u8> for &mut Decimal

Source§

fn sub_assign(&mut self, other: u8)

Performs the -= operation. Read more
Source§

impl SubAssign<u8> for Decimal

Source§

fn sub_assign(&mut self, other: u8)

Performs the -= operation. Read more
Source§

impl SubAssign<usize> for &mut Decimal

Source§

fn sub_assign(&mut self, other: usize)

Performs the -= operation. Read more
Source§

impl SubAssign<usize> for Decimal

Source§

fn sub_assign(&mut self, other: usize)

Performs the -= operation. Read more
Source§

impl SubAssign for Decimal

Source§

fn sub_assign(&mut self, other: Decimal)

Performs the -= operation. Read more
Source§

impl<'a> Sum<&'a Decimal> for Decimal

Source§

fn sum<I>(iter: I) -> Decimal
where I: Iterator<Item = &'a Decimal>,

Takes an iterator and generates Self from the elements by “summing up” the items.
Source§

impl Sum for Decimal

Source§

fn sum<I>(iter: I) -> Decimal
where I: Iterator<Item = Decimal>,

Takes an iterator and generates Self from the elements by “summing up” the items.
Source§

impl TryFrom<f32> for Decimal

Source§

type Error = DecimalConvertError

The type returned in the event of a conversion error.
Source§

fn try_from(value: f32) -> Result<Decimal, <Decimal as TryFrom<f32>>::Error>

Performs the conversion.
Source§

impl TryFrom<f64> for Decimal

Source§

type Error = DecimalConvertError

The type returned in the event of a conversion error.
Source§

fn try_from(value: f64) -> Result<Decimal, <Decimal as TryFrom<f64>>::Error>

Performs the conversion.
Source§

impl TryFrom<i128> for Decimal

Source§

type Error = DecimalConvertError

The type returned in the event of a conversion error.
Source§

fn try_from(val: i128) -> Result<Decimal, <Decimal as TryFrom<i128>>::Error>

Performs the conversion.
Source§

impl TryFrom<u128> for Decimal

Source§

type Error = DecimalConvertError

The type returned in the event of a conversion error.
Source§

fn try_from(value: 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 T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

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 T
where T: Clone,

Source§

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 T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.