Struct decimal_rs::Decimal
source · #[repr(C, packed(4))]pub struct Decimal { /* private fields */ }
Expand description
High precision decimal.
Implementations§
source§impl Decimal
impl Decimal
sourcepub const unsafe fn from_parts_unchecked(
int_val: u128,
scale: i16,
negative: bool
) -> Decimal
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]
.
sourcepub const fn from_parts(
int_val: u128,
scale: i16,
negative: bool
) -> Result<Decimal, DecimalConvertError>
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]
.
sourcepub const fn into_parts(self) -> (u128, i16, bool)
pub const fn into_parts(self) -> (u128, i16, bool)
Consumes the Decimal
, returning (int_val, scale, negative)
.
sourcepub fn precision(&self) -> u8
pub fn precision(&self) -> u8
Returns the precision, i.e. the count of significant digits in this decimal.
sourcepub const fn scale(&self) -> i16
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.
sourcepub const fn is_sign_negative(&self) -> bool
pub const fn is_sign_negative(&self) -> bool
Returns true
if the sign bit of the decimal is negative.
sourcepub const fn is_sign_positive(&self) -> bool
pub const fn is_sign_positive(&self) -> bool
Returns true
if the sign bit of the decimal is positive.
sourcepub fn encode<W: Write>(&self, writer: W) -> Result<usize>
pub fn encode<W: Write>(&self, writer: W) -> Result<usize>
Encodes self
to writer
as binary bytes.
Returns total size on success, which is not larger than MAX_BINARY_SIZE
.
sourcepub fn compact_encode<W: Write>(&self, writer: W) -> Result<usize>
pub fn compact_encode<W: Write>(&self, writer: W) -> Result<usize>
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.
sourcepub fn ceil(&self) -> Decimal
pub fn ceil(&self) -> Decimal
Computes the smallest integer that is greater than or equal to self
.
sourcepub fn floor(&self) -> Decimal
pub fn floor(&self) -> Decimal
Computes the largest integer that is equal to or less than self
.
sourcepub fn trunc(&self, scale: i16) -> Decimal
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.
sourcepub fn round(&self, scale: i16) -> Decimal
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.
sourcepub fn round_with_precision(&mut self, precision: u8, scale: i16) -> bool
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.
sourcepub fn normalize_to_scale(&self, scale: i16) -> Decimal
pub fn normalize_to_scale(&self, scale: i16) -> Decimal
Normalize a Decimal
’s scale toward specified scale
.
sourcepub fn checked_add(&self, other: impl AsRef<Decimal>) -> Option<Decimal>
pub fn checked_add(&self, other: impl AsRef<Decimal>) -> Option<Decimal>
Add two decimals.
returning None
if overflow occurred.
sourcepub unsafe fn add_with_same_scale_unchecked<const DECIMAL_MODEL: u8>(
&self,
other: &Decimal,
scale: i16
) -> Decimal
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.
sourcepub unsafe fn add_with_same_scale_and_negative_unchecked<const DECIMAL_MODEL: u8>(
&self,
other: &Decimal,
scale: i16,
negative: bool
) -> Decimal
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
- decimal is zero or the scale is the same.
- the result is not overflow.
- decimal is zero or the negative is the same.
sourcepub fn checked_sub(&self, other: impl AsRef<Decimal>) -> Option<Decimal>
pub fn checked_sub(&self, other: impl AsRef<Decimal>) -> Option<Decimal>
Subtract one decimal from another,
returning None
if overflow occurred.
sourcepub unsafe fn sub_with_same_scale_unchecked<const DECIMAL_MODEL: u8>(
&self,
other: &Decimal,
scale: i16
) -> Decimal
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.
sourcepub fn checked_mul(&self, other: impl AsRef<Decimal>) -> Option<Decimal>
pub fn checked_mul(&self, other: impl AsRef<Decimal>) -> Option<Decimal>
Calculate the product of two decimals,
returning None
if overflow occurred.
sourcepub unsafe fn mul_unchecked<const DECIMAL_MODEL: u8>(
&self,
other: &Decimal,
scale: i16
) -> Decimal
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.
sourcepub fn checked_div(&self, other: impl AsRef<Decimal>) -> Option<Decimal>
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.
sourcepub fn checked_rem(&self, other: impl AsRef<Decimal>) -> Option<Decimal>
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.
sourcepub fn sqrt(&self) -> Option<Decimal>
pub fn sqrt(&self) -> Option<Decimal>
Computes the square root of a decimal,
returning None if self
is negative or the results in overflow.
sourcepub fn simply_format<W: Write>(&self, w: W) -> Result<(), DecimalFormatError>
pub fn simply_format<W: Write>(&self, w: W) -> Result<(), DecimalFormatError>
Formats the decimal, including sign and omitting integer zero in fractional.
sourcepub fn format_with_sci<W: Write>(
&self,
max_width: u16,
w: W
) -> Result<(), DecimalFormatError>
pub fn format_with_sci<W: Write>( &self, max_width: u16, w: W ) -> Result<(), DecimalFormatError>
Formats the decimal, using scientific notation depending on the width.
sourcepub fn format_with_sci_forced<W: Write>(
&self,
expect_scale: i16,
with_zero_before_dot: bool,
w: W
) -> Result<(), DecimalFormatError>
pub fn format_with_sci_forced<W: Write>( &self, expect_scale: i16, with_zero_before_dot: bool, w: W ) -> Result<(), DecimalFormatError>
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.
sourcepub fn format_to_hex<W: Write>(
&self,
is_uppercase: bool,
w: W
) -> Result<(), DecimalFormatError>
pub fn format_to_hex<W: Write>( &self, is_uppercase: bool, w: W ) -> Result<(), DecimalFormatError>
Format decimal as a hexadecimal number.
A maximum of 63 digits hexadecimal positive number are supported.
sourcepub fn format_to_json<W: Write>(&self, w: W) -> Result<(), DecimalFormatError>
pub fn format_to_json<W: Write>(&self, w: W) -> Result<(), DecimalFormatError>
Formats the decimal in the json number format, using scientific notation depending on the width.
sourcepub fn checked_pow(&self, exponent: &Decimal) -> Option<Decimal>
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.
Trait Implementations§
source§impl AddAssign<&Decimal> for &mut Decimal
impl AddAssign<&Decimal> for &mut Decimal
source§fn add_assign(&mut self, other: &Decimal)
fn add_assign(&mut self, other: &Decimal)
+=
operation. Read moresource§impl AddAssign<&Decimal> for Decimal
impl AddAssign<&Decimal> for Decimal
source§fn add_assign(&mut self, other: &Decimal)
fn add_assign(&mut self, other: &Decimal)
+=
operation. Read moresource§impl AddAssign<Decimal> for &mut Decimal
impl AddAssign<Decimal> for &mut Decimal
source§fn add_assign(&mut self, other: Decimal)
fn add_assign(&mut self, other: Decimal)
+=
operation. Read moresource§impl AddAssign<Decimal> for Decimal
impl AddAssign<Decimal> for Decimal
source§fn add_assign(&mut self, other: Decimal)
fn add_assign(&mut self, other: Decimal)
+=
operation. Read moresource§impl AddAssign<f32> for &mut Decimal
impl AddAssign<f32> for &mut Decimal
source§fn add_assign(&mut self, other: f32)
fn add_assign(&mut self, other: f32)
+=
operation. Read moresource§impl AddAssign<f32> for Decimal
impl AddAssign<f32> for Decimal
source§fn add_assign(&mut self, other: f32)
fn add_assign(&mut self, other: f32)
+=
operation. Read moresource§impl AddAssign<f64> for &mut Decimal
impl AddAssign<f64> for &mut Decimal
source§fn add_assign(&mut self, other: f64)
fn add_assign(&mut self, other: f64)
+=
operation. Read moresource§impl AddAssign<f64> for Decimal
impl AddAssign<f64> for Decimal
source§fn add_assign(&mut self, other: f64)
fn add_assign(&mut self, other: f64)
+=
operation. Read moresource§impl AddAssign<i128> for &mut Decimal
impl AddAssign<i128> for &mut Decimal
source§fn add_assign(&mut self, other: i128)
fn add_assign(&mut self, other: i128)
+=
operation. Read moresource§impl AddAssign<i128> for Decimal
impl AddAssign<i128> for Decimal
source§fn add_assign(&mut self, other: i128)
fn add_assign(&mut self, other: i128)
+=
operation. Read moresource§impl AddAssign<i16> for &mut Decimal
impl AddAssign<i16> for &mut Decimal
source§fn add_assign(&mut self, other: i16)
fn add_assign(&mut self, other: i16)
+=
operation. Read moresource§impl AddAssign<i16> for Decimal
impl AddAssign<i16> for Decimal
source§fn add_assign(&mut self, other: i16)
fn add_assign(&mut self, other: i16)
+=
operation. Read moresource§impl AddAssign<i32> for &mut Decimal
impl AddAssign<i32> for &mut Decimal
source§fn add_assign(&mut self, other: i32)
fn add_assign(&mut self, other: i32)
+=
operation. Read moresource§impl AddAssign<i32> for Decimal
impl AddAssign<i32> for Decimal
source§fn add_assign(&mut self, other: i32)
fn add_assign(&mut self, other: i32)
+=
operation. Read moresource§impl AddAssign<i64> for &mut Decimal
impl AddAssign<i64> for &mut Decimal
source§fn add_assign(&mut self, other: i64)
fn add_assign(&mut self, other: i64)
+=
operation. Read moresource§impl AddAssign<i64> for Decimal
impl AddAssign<i64> for Decimal
source§fn add_assign(&mut self, other: i64)
fn add_assign(&mut self, other: i64)
+=
operation. Read moresource§impl AddAssign<i8> for &mut Decimal
impl AddAssign<i8> for &mut Decimal
source§fn add_assign(&mut self, other: i8)
fn add_assign(&mut self, other: i8)
+=
operation. Read moresource§impl AddAssign<i8> for Decimal
impl AddAssign<i8> for Decimal
source§fn add_assign(&mut self, other: i8)
fn add_assign(&mut self, other: i8)
+=
operation. Read moresource§impl AddAssign<isize> for &mut Decimal
impl AddAssign<isize> for &mut Decimal
source§fn add_assign(&mut self, other: isize)
fn add_assign(&mut self, other: isize)
+=
operation. Read moresource§impl AddAssign<isize> for Decimal
impl AddAssign<isize> for Decimal
source§fn add_assign(&mut self, other: isize)
fn add_assign(&mut self, other: isize)
+=
operation. Read moresource§impl AddAssign<u128> for &mut Decimal
impl AddAssign<u128> for &mut Decimal
source§fn add_assign(&mut self, other: u128)
fn add_assign(&mut self, other: u128)
+=
operation. Read moresource§impl AddAssign<u128> for Decimal
impl AddAssign<u128> for Decimal
source§fn add_assign(&mut self, other: u128)
fn add_assign(&mut self, other: u128)
+=
operation. Read moresource§impl AddAssign<u16> for &mut Decimal
impl AddAssign<u16> for &mut Decimal
source§fn add_assign(&mut self, other: u16)
fn add_assign(&mut self, other: u16)
+=
operation. Read moresource§impl AddAssign<u16> for Decimal
impl AddAssign<u16> for Decimal
source§fn add_assign(&mut self, other: u16)
fn add_assign(&mut self, other: u16)
+=
operation. Read moresource§impl AddAssign<u32> for &mut Decimal
impl AddAssign<u32> for &mut Decimal
source§fn add_assign(&mut self, other: u32)
fn add_assign(&mut self, other: u32)
+=
operation. Read moresource§impl AddAssign<u32> for Decimal
impl AddAssign<u32> for Decimal
source§fn add_assign(&mut self, other: u32)
fn add_assign(&mut self, other: u32)
+=
operation. Read moresource§impl AddAssign<u64> for &mut Decimal
impl AddAssign<u64> for &mut Decimal
source§fn add_assign(&mut self, other: u64)
fn add_assign(&mut self, other: u64)
+=
operation. Read moresource§impl AddAssign<u64> for Decimal
impl AddAssign<u64> for Decimal
source§fn add_assign(&mut self, other: u64)
fn add_assign(&mut self, other: u64)
+=
operation. Read moresource§impl AddAssign<u8> for &mut Decimal
impl AddAssign<u8> for &mut Decimal
source§fn add_assign(&mut self, other: u8)
fn add_assign(&mut self, other: u8)
+=
operation. Read moresource§impl AddAssign<u8> for Decimal
impl AddAssign<u8> for Decimal
source§fn add_assign(&mut self, other: u8)
fn add_assign(&mut self, other: u8)
+=
operation. Read moresource§impl AddAssign<usize> for &mut Decimal
impl AddAssign<usize> for &mut Decimal
source§fn add_assign(&mut self, other: usize)
fn add_assign(&mut self, other: usize)
+=
operation. Read moresource§impl AddAssign<usize> for Decimal
impl AddAssign<usize> for Decimal
source§fn add_assign(&mut self, other: usize)
fn add_assign(&mut self, other: usize)
+=
operation. Read moresource§impl<'de> Deserialize<'de> for Decimal
Available on crate feature serde
only.
impl<'de> Deserialize<'de> for Decimal
serde
only.source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where D: Deserializer<'de>,
source§impl DivAssign<&Decimal> for &mut Decimal
impl DivAssign<&Decimal> for &mut Decimal
source§fn div_assign(&mut self, other: &Decimal)
fn div_assign(&mut self, other: &Decimal)
/=
operation. Read moresource§impl DivAssign<&Decimal> for Decimal
impl DivAssign<&Decimal> for Decimal
source§fn div_assign(&mut self, other: &Decimal)
fn div_assign(&mut self, other: &Decimal)
/=
operation. Read moresource§impl DivAssign<Decimal> for &mut Decimal
impl DivAssign<Decimal> for &mut Decimal
source§fn div_assign(&mut self, other: Decimal)
fn div_assign(&mut self, other: Decimal)
/=
operation. Read moresource§impl DivAssign<Decimal> for Decimal
impl DivAssign<Decimal> for Decimal
source§fn div_assign(&mut self, other: Decimal)
fn div_assign(&mut self, other: Decimal)
/=
operation. Read moresource§impl DivAssign<f32> for &mut Decimal
impl DivAssign<f32> for &mut Decimal
source§fn div_assign(&mut self, other: f32)
fn div_assign(&mut self, other: f32)
/=
operation. Read moresource§impl DivAssign<f32> for Decimal
impl DivAssign<f32> for Decimal
source§fn div_assign(&mut self, other: f32)
fn div_assign(&mut self, other: f32)
/=
operation. Read moresource§impl DivAssign<f64> for &mut Decimal
impl DivAssign<f64> for &mut Decimal
source§fn div_assign(&mut self, other: f64)
fn div_assign(&mut self, other: f64)
/=
operation. Read moresource§impl DivAssign<f64> for Decimal
impl DivAssign<f64> for Decimal
source§fn div_assign(&mut self, other: f64)
fn div_assign(&mut self, other: f64)
/=
operation. Read moresource§impl DivAssign<i128> for &mut Decimal
impl DivAssign<i128> for &mut Decimal
source§fn div_assign(&mut self, other: i128)
fn div_assign(&mut self, other: i128)
/=
operation. Read moresource§impl DivAssign<i128> for Decimal
impl DivAssign<i128> for Decimal
source§fn div_assign(&mut self, other: i128)
fn div_assign(&mut self, other: i128)
/=
operation. Read moresource§impl DivAssign<i16> for &mut Decimal
impl DivAssign<i16> for &mut Decimal
source§fn div_assign(&mut self, other: i16)
fn div_assign(&mut self, other: i16)
/=
operation. Read moresource§impl DivAssign<i16> for Decimal
impl DivAssign<i16> for Decimal
source§fn div_assign(&mut self, other: i16)
fn div_assign(&mut self, other: i16)
/=
operation. Read moresource§impl DivAssign<i32> for &mut Decimal
impl DivAssign<i32> for &mut Decimal
source§fn div_assign(&mut self, other: i32)
fn div_assign(&mut self, other: i32)
/=
operation. Read moresource§impl DivAssign<i32> for Decimal
impl DivAssign<i32> for Decimal
source§fn div_assign(&mut self, other: i32)
fn div_assign(&mut self, other: i32)
/=
operation. Read moresource§impl DivAssign<i64> for &mut Decimal
impl DivAssign<i64> for &mut Decimal
source§fn div_assign(&mut self, other: i64)
fn div_assign(&mut self, other: i64)
/=
operation. Read moresource§impl DivAssign<i64> for Decimal
impl DivAssign<i64> for Decimal
source§fn div_assign(&mut self, other: i64)
fn div_assign(&mut self, other: i64)
/=
operation. Read moresource§impl DivAssign<i8> for &mut Decimal
impl DivAssign<i8> for &mut Decimal
source§fn div_assign(&mut self, other: i8)
fn div_assign(&mut self, other: i8)
/=
operation. Read moresource§impl DivAssign<i8> for Decimal
impl DivAssign<i8> for Decimal
source§fn div_assign(&mut self, other: i8)
fn div_assign(&mut self, other: i8)
/=
operation. Read moresource§impl DivAssign<isize> for &mut Decimal
impl DivAssign<isize> for &mut Decimal
source§fn div_assign(&mut self, other: isize)
fn div_assign(&mut self, other: isize)
/=
operation. Read moresource§impl DivAssign<isize> for Decimal
impl DivAssign<isize> for Decimal
source§fn div_assign(&mut self, other: isize)
fn div_assign(&mut self, other: isize)
/=
operation. Read moresource§impl DivAssign<u128> for &mut Decimal
impl DivAssign<u128> for &mut Decimal
source§fn div_assign(&mut self, other: u128)
fn div_assign(&mut self, other: u128)
/=
operation. Read moresource§impl DivAssign<u128> for Decimal
impl DivAssign<u128> for Decimal
source§fn div_assign(&mut self, other: u128)
fn div_assign(&mut self, other: u128)
/=
operation. Read moresource§impl DivAssign<u16> for &mut Decimal
impl DivAssign<u16> for &mut Decimal
source§fn div_assign(&mut self, other: u16)
fn div_assign(&mut self, other: u16)
/=
operation. Read moresource§impl DivAssign<u16> for Decimal
impl DivAssign<u16> for Decimal
source§fn div_assign(&mut self, other: u16)
fn div_assign(&mut self, other: u16)
/=
operation. Read moresource§impl DivAssign<u32> for &mut Decimal
impl DivAssign<u32> for &mut Decimal
source§fn div_assign(&mut self, other: u32)
fn div_assign(&mut self, other: u32)
/=
operation. Read moresource§impl DivAssign<u32> for Decimal
impl DivAssign<u32> for Decimal
source§fn div_assign(&mut self, other: u32)
fn div_assign(&mut self, other: u32)
/=
operation. Read moresource§impl DivAssign<u64> for &mut Decimal
impl DivAssign<u64> for &mut Decimal
source§fn div_assign(&mut self, other: u64)
fn div_assign(&mut self, other: u64)
/=
operation. Read moresource§impl DivAssign<u64> for Decimal
impl DivAssign<u64> for Decimal
source§fn div_assign(&mut self, other: u64)
fn div_assign(&mut self, other: u64)
/=
operation. Read moresource§impl DivAssign<u8> for &mut Decimal
impl DivAssign<u8> for &mut Decimal
source§fn div_assign(&mut self, other: u8)
fn div_assign(&mut self, other: u8)
/=
operation. Read moresource§impl DivAssign<u8> for Decimal
impl DivAssign<u8> for Decimal
source§fn div_assign(&mut self, other: u8)
fn div_assign(&mut self, other: u8)
/=
operation. Read moresource§impl DivAssign<usize> for &mut Decimal
impl DivAssign<usize> for &mut Decimal
source§fn div_assign(&mut self, other: usize)
fn div_assign(&mut self, other: usize)
/=
operation. Read moresource§impl DivAssign<usize> for Decimal
impl DivAssign<usize> for Decimal
source§fn div_assign(&mut self, other: usize)
fn div_assign(&mut self, other: usize)
/=
operation. Read moresource§impl MulAssign<&Decimal> for &mut Decimal
impl MulAssign<&Decimal> for &mut Decimal
source§fn mul_assign(&mut self, other: &Decimal)
fn mul_assign(&mut self, other: &Decimal)
*=
operation. Read moresource§impl MulAssign<&Decimal> for Decimal
impl MulAssign<&Decimal> for Decimal
source§fn mul_assign(&mut self, other: &Decimal)
fn mul_assign(&mut self, other: &Decimal)
*=
operation. Read moresource§impl MulAssign<Decimal> for &mut Decimal
impl MulAssign<Decimal> for &mut Decimal
source§fn mul_assign(&mut self, other: Decimal)
fn mul_assign(&mut self, other: Decimal)
*=
operation. Read moresource§impl MulAssign<Decimal> for Decimal
impl MulAssign<Decimal> for Decimal
source§fn mul_assign(&mut self, other: Decimal)
fn mul_assign(&mut self, other: Decimal)
*=
operation. Read moresource§impl MulAssign<f32> for &mut Decimal
impl MulAssign<f32> for &mut Decimal
source§fn mul_assign(&mut self, other: f32)
fn mul_assign(&mut self, other: f32)
*=
operation. Read moresource§impl MulAssign<f32> for Decimal
impl MulAssign<f32> for Decimal
source§fn mul_assign(&mut self, other: f32)
fn mul_assign(&mut self, other: f32)
*=
operation. Read moresource§impl MulAssign<f64> for &mut Decimal
impl MulAssign<f64> for &mut Decimal
source§fn mul_assign(&mut self, other: f64)
fn mul_assign(&mut self, other: f64)
*=
operation. Read moresource§impl MulAssign<f64> for Decimal
impl MulAssign<f64> for Decimal
source§fn mul_assign(&mut self, other: f64)
fn mul_assign(&mut self, other: f64)
*=
operation. Read moresource§impl MulAssign<i128> for &mut Decimal
impl MulAssign<i128> for &mut Decimal
source§fn mul_assign(&mut self, other: i128)
fn mul_assign(&mut self, other: i128)
*=
operation. Read moresource§impl MulAssign<i128> for Decimal
impl MulAssign<i128> for Decimal
source§fn mul_assign(&mut self, other: i128)
fn mul_assign(&mut self, other: i128)
*=
operation. Read moresource§impl MulAssign<i16> for &mut Decimal
impl MulAssign<i16> for &mut Decimal
source§fn mul_assign(&mut self, other: i16)
fn mul_assign(&mut self, other: i16)
*=
operation. Read moresource§impl MulAssign<i16> for Decimal
impl MulAssign<i16> for Decimal
source§fn mul_assign(&mut self, other: i16)
fn mul_assign(&mut self, other: i16)
*=
operation. Read moresource§impl MulAssign<i32> for &mut Decimal
impl MulAssign<i32> for &mut Decimal
source§fn mul_assign(&mut self, other: i32)
fn mul_assign(&mut self, other: i32)
*=
operation. Read moresource§impl MulAssign<i32> for Decimal
impl MulAssign<i32> for Decimal
source§fn mul_assign(&mut self, other: i32)
fn mul_assign(&mut self, other: i32)
*=
operation. Read moresource§impl MulAssign<i64> for &mut Decimal
impl MulAssign<i64> for &mut Decimal
source§fn mul_assign(&mut self, other: i64)
fn mul_assign(&mut self, other: i64)
*=
operation. Read moresource§impl MulAssign<i64> for Decimal
impl MulAssign<i64> for Decimal
source§fn mul_assign(&mut self, other: i64)
fn mul_assign(&mut self, other: i64)
*=
operation. Read moresource§impl MulAssign<i8> for &mut Decimal
impl MulAssign<i8> for &mut Decimal
source§fn mul_assign(&mut self, other: i8)
fn mul_assign(&mut self, other: i8)
*=
operation. Read moresource§impl MulAssign<i8> for Decimal
impl MulAssign<i8> for Decimal
source§fn mul_assign(&mut self, other: i8)
fn mul_assign(&mut self, other: i8)
*=
operation. Read moresource§impl MulAssign<isize> for &mut Decimal
impl MulAssign<isize> for &mut Decimal
source§fn mul_assign(&mut self, other: isize)
fn mul_assign(&mut self, other: isize)
*=
operation. Read moresource§impl MulAssign<isize> for Decimal
impl MulAssign<isize> for Decimal
source§fn mul_assign(&mut self, other: isize)
fn mul_assign(&mut self, other: isize)
*=
operation. Read moresource§impl MulAssign<u128> for &mut Decimal
impl MulAssign<u128> for &mut Decimal
source§fn mul_assign(&mut self, other: u128)
fn mul_assign(&mut self, other: u128)
*=
operation. Read moresource§impl MulAssign<u128> for Decimal
impl MulAssign<u128> for Decimal
source§fn mul_assign(&mut self, other: u128)
fn mul_assign(&mut self, other: u128)
*=
operation. Read moresource§impl MulAssign<u16> for &mut Decimal
impl MulAssign<u16> for &mut Decimal
source§fn mul_assign(&mut self, other: u16)
fn mul_assign(&mut self, other: u16)
*=
operation. Read moresource§impl MulAssign<u16> for Decimal
impl MulAssign<u16> for Decimal
source§fn mul_assign(&mut self, other: u16)
fn mul_assign(&mut self, other: u16)
*=
operation. Read moresource§impl MulAssign<u32> for &mut Decimal
impl MulAssign<u32> for &mut Decimal
source§fn mul_assign(&mut self, other: u32)
fn mul_assign(&mut self, other: u32)
*=
operation. Read moresource§impl MulAssign<u32> for Decimal
impl MulAssign<u32> for Decimal
source§fn mul_assign(&mut self, other: u32)
fn mul_assign(&mut self, other: u32)
*=
operation. Read moresource§impl MulAssign<u64> for &mut Decimal
impl MulAssign<u64> for &mut Decimal
source§fn mul_assign(&mut self, other: u64)
fn mul_assign(&mut self, other: u64)
*=
operation. Read moresource§impl MulAssign<u64> for Decimal
impl MulAssign<u64> for Decimal
source§fn mul_assign(&mut self, other: u64)
fn mul_assign(&mut self, other: u64)
*=
operation. Read moresource§impl MulAssign<u8> for &mut Decimal
impl MulAssign<u8> for &mut Decimal
source§fn mul_assign(&mut self, other: u8)
fn mul_assign(&mut self, other: u8)
*=
operation. Read moresource§impl MulAssign<u8> for Decimal
impl MulAssign<u8> for Decimal
source§fn mul_assign(&mut self, other: u8)
fn mul_assign(&mut self, other: u8)
*=
operation. Read moresource§impl MulAssign<usize> for &mut Decimal
impl MulAssign<usize> for &mut Decimal
source§fn mul_assign(&mut self, other: usize)
fn mul_assign(&mut self, other: usize)
*=
operation. Read moresource§impl MulAssign<usize> for Decimal
impl MulAssign<usize> for Decimal
source§fn mul_assign(&mut self, other: usize)
fn mul_assign(&mut self, other: usize)
*=
operation. Read moresource§impl Ord for Decimal
impl Ord for Decimal
source§impl PartialEq<&Decimal> for Decimal
impl PartialEq<&Decimal> for Decimal
source§impl PartialEq<Decimal> for &Decimal
impl PartialEq<Decimal> for &Decimal
source§impl PartialEq<Decimal> for Decimal
impl PartialEq<Decimal> for Decimal
source§impl PartialOrd<&Decimal> for Decimal
impl PartialOrd<&Decimal> for Decimal
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl PartialOrd<Decimal> for &Decimal
impl PartialOrd<Decimal> for &Decimal
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl PartialOrd<Decimal> for Decimal
impl PartialOrd<Decimal> for Decimal
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl RemAssign<&Decimal> for &mut Decimal
impl RemAssign<&Decimal> for &mut Decimal
source§fn rem_assign(&mut self, other: &Decimal)
fn rem_assign(&mut self, other: &Decimal)
%=
operation. Read moresource§impl RemAssign<&Decimal> for Decimal
impl RemAssign<&Decimal> for Decimal
source§fn rem_assign(&mut self, other: &Decimal)
fn rem_assign(&mut self, other: &Decimal)
%=
operation. Read moresource§impl RemAssign<Decimal> for &mut Decimal
impl RemAssign<Decimal> for &mut Decimal
source§fn rem_assign(&mut self, other: Decimal)
fn rem_assign(&mut self, other: Decimal)
%=
operation. Read moresource§impl RemAssign<Decimal> for Decimal
impl RemAssign<Decimal> for Decimal
source§fn rem_assign(&mut self, other: Decimal)
fn rem_assign(&mut self, other: Decimal)
%=
operation. Read moresource§impl RemAssign<f32> for &mut Decimal
impl RemAssign<f32> for &mut Decimal
source§fn rem_assign(&mut self, other: f32)
fn rem_assign(&mut self, other: f32)
%=
operation. Read moresource§impl RemAssign<f32> for Decimal
impl RemAssign<f32> for Decimal
source§fn rem_assign(&mut self, other: f32)
fn rem_assign(&mut self, other: f32)
%=
operation. Read moresource§impl RemAssign<f64> for &mut Decimal
impl RemAssign<f64> for &mut Decimal
source§fn rem_assign(&mut self, other: f64)
fn rem_assign(&mut self, other: f64)
%=
operation. Read moresource§impl RemAssign<f64> for Decimal
impl RemAssign<f64> for Decimal
source§fn rem_assign(&mut self, other: f64)
fn rem_assign(&mut self, other: f64)
%=
operation. Read moresource§impl RemAssign<i128> for &mut Decimal
impl RemAssign<i128> for &mut Decimal
source§fn rem_assign(&mut self, other: i128)
fn rem_assign(&mut self, other: i128)
%=
operation. Read moresource§impl RemAssign<i128> for Decimal
impl RemAssign<i128> for Decimal
source§fn rem_assign(&mut self, other: i128)
fn rem_assign(&mut self, other: i128)
%=
operation. Read moresource§impl RemAssign<i16> for &mut Decimal
impl RemAssign<i16> for &mut Decimal
source§fn rem_assign(&mut self, other: i16)
fn rem_assign(&mut self, other: i16)
%=
operation. Read moresource§impl RemAssign<i16> for Decimal
impl RemAssign<i16> for Decimal
source§fn rem_assign(&mut self, other: i16)
fn rem_assign(&mut self, other: i16)
%=
operation. Read moresource§impl RemAssign<i32> for &mut Decimal
impl RemAssign<i32> for &mut Decimal
source§fn rem_assign(&mut self, other: i32)
fn rem_assign(&mut self, other: i32)
%=
operation. Read moresource§impl RemAssign<i32> for Decimal
impl RemAssign<i32> for Decimal
source§fn rem_assign(&mut self, other: i32)
fn rem_assign(&mut self, other: i32)
%=
operation. Read moresource§impl RemAssign<i64> for &mut Decimal
impl RemAssign<i64> for &mut Decimal
source§fn rem_assign(&mut self, other: i64)
fn rem_assign(&mut self, other: i64)
%=
operation. Read moresource§impl RemAssign<i64> for Decimal
impl RemAssign<i64> for Decimal
source§fn rem_assign(&mut self, other: i64)
fn rem_assign(&mut self, other: i64)
%=
operation. Read moresource§impl RemAssign<i8> for &mut Decimal
impl RemAssign<i8> for &mut Decimal
source§fn rem_assign(&mut self, other: i8)
fn rem_assign(&mut self, other: i8)
%=
operation. Read moresource§impl RemAssign<i8> for Decimal
impl RemAssign<i8> for Decimal
source§fn rem_assign(&mut self, other: i8)
fn rem_assign(&mut self, other: i8)
%=
operation. Read moresource§impl RemAssign<isize> for &mut Decimal
impl RemAssign<isize> for &mut Decimal
source§fn rem_assign(&mut self, other: isize)
fn rem_assign(&mut self, other: isize)
%=
operation. Read moresource§impl RemAssign<isize> for Decimal
impl RemAssign<isize> for Decimal
source§fn rem_assign(&mut self, other: isize)
fn rem_assign(&mut self, other: isize)
%=
operation. Read moresource§impl RemAssign<u128> for &mut Decimal
impl RemAssign<u128> for &mut Decimal
source§fn rem_assign(&mut self, other: u128)
fn rem_assign(&mut self, other: u128)
%=
operation. Read moresource§impl RemAssign<u128> for Decimal
impl RemAssign<u128> for Decimal
source§fn rem_assign(&mut self, other: u128)
fn rem_assign(&mut self, other: u128)
%=
operation. Read moresource§impl RemAssign<u16> for &mut Decimal
impl RemAssign<u16> for &mut Decimal
source§fn rem_assign(&mut self, other: u16)
fn rem_assign(&mut self, other: u16)
%=
operation. Read moresource§impl RemAssign<u16> for Decimal
impl RemAssign<u16> for Decimal
source§fn rem_assign(&mut self, other: u16)
fn rem_assign(&mut self, other: u16)
%=
operation. Read moresource§impl RemAssign<u32> for &mut Decimal
impl RemAssign<u32> for &mut Decimal
source§fn rem_assign(&mut self, other: u32)
fn rem_assign(&mut self, other: u32)
%=
operation. Read moresource§impl RemAssign<u32> for Decimal
impl RemAssign<u32> for Decimal
source§fn rem_assign(&mut self, other: u32)
fn rem_assign(&mut self, other: u32)
%=
operation. Read moresource§impl RemAssign<u64> for &mut Decimal
impl RemAssign<u64> for &mut Decimal
source§fn rem_assign(&mut self, other: u64)
fn rem_assign(&mut self, other: u64)
%=
operation. Read moresource§impl RemAssign<u64> for Decimal
impl RemAssign<u64> for Decimal
source§fn rem_assign(&mut self, other: u64)
fn rem_assign(&mut self, other: u64)
%=
operation. Read moresource§impl RemAssign<u8> for &mut Decimal
impl RemAssign<u8> for &mut Decimal
source§fn rem_assign(&mut self, other: u8)
fn rem_assign(&mut self, other: u8)
%=
operation. Read moresource§impl RemAssign<u8> for Decimal
impl RemAssign<u8> for Decimal
source§fn rem_assign(&mut self, other: u8)
fn rem_assign(&mut self, other: u8)
%=
operation. Read moresource§impl RemAssign<usize> for &mut Decimal
impl RemAssign<usize> for &mut Decimal
source§fn rem_assign(&mut self, other: usize)
fn rem_assign(&mut self, other: usize)
%=
operation. Read moresource§impl RemAssign<usize> for Decimal
impl RemAssign<usize> for Decimal
source§fn rem_assign(&mut self, other: usize)
fn rem_assign(&mut self, other: usize)
%=
operation. Read moresource§impl SubAssign<&Decimal> for &mut Decimal
impl SubAssign<&Decimal> for &mut Decimal
source§fn sub_assign(&mut self, other: &Decimal)
fn sub_assign(&mut self, other: &Decimal)
-=
operation. Read moresource§impl SubAssign<&Decimal> for Decimal
impl SubAssign<&Decimal> for Decimal
source§fn sub_assign(&mut self, other: &Decimal)
fn sub_assign(&mut self, other: &Decimal)
-=
operation. Read moresource§impl SubAssign<Decimal> for &mut Decimal
impl SubAssign<Decimal> for &mut Decimal
source§fn sub_assign(&mut self, other: Decimal)
fn sub_assign(&mut self, other: Decimal)
-=
operation. Read moresource§impl SubAssign<Decimal> for Decimal
impl SubAssign<Decimal> for Decimal
source§fn sub_assign(&mut self, other: Decimal)
fn sub_assign(&mut self, other: Decimal)
-=
operation. Read moresource§impl SubAssign<f32> for &mut Decimal
impl SubAssign<f32> for &mut Decimal
source§fn sub_assign(&mut self, other: f32)
fn sub_assign(&mut self, other: f32)
-=
operation. Read moresource§impl SubAssign<f32> for Decimal
impl SubAssign<f32> for Decimal
source§fn sub_assign(&mut self, other: f32)
fn sub_assign(&mut self, other: f32)
-=
operation. Read moresource§impl SubAssign<f64> for &mut Decimal
impl SubAssign<f64> for &mut Decimal
source§fn sub_assign(&mut self, other: f64)
fn sub_assign(&mut self, other: f64)
-=
operation. Read moresource§impl SubAssign<f64> for Decimal
impl SubAssign<f64> for Decimal
source§fn sub_assign(&mut self, other: f64)
fn sub_assign(&mut self, other: f64)
-=
operation. Read moresource§impl SubAssign<i128> for &mut Decimal
impl SubAssign<i128> for &mut Decimal
source§fn sub_assign(&mut self, other: i128)
fn sub_assign(&mut self, other: i128)
-=
operation. Read moresource§impl SubAssign<i128> for Decimal
impl SubAssign<i128> for Decimal
source§fn sub_assign(&mut self, other: i128)
fn sub_assign(&mut self, other: i128)
-=
operation. Read moresource§impl SubAssign<i16> for &mut Decimal
impl SubAssign<i16> for &mut Decimal
source§fn sub_assign(&mut self, other: i16)
fn sub_assign(&mut self, other: i16)
-=
operation. Read moresource§impl SubAssign<i16> for Decimal
impl SubAssign<i16> for Decimal
source§fn sub_assign(&mut self, other: i16)
fn sub_assign(&mut self, other: i16)
-=
operation. Read moresource§impl SubAssign<i32> for &mut Decimal
impl SubAssign<i32> for &mut Decimal
source§fn sub_assign(&mut self, other: i32)
fn sub_assign(&mut self, other: i32)
-=
operation. Read moresource§impl SubAssign<i32> for Decimal
impl SubAssign<i32> for Decimal
source§fn sub_assign(&mut self, other: i32)
fn sub_assign(&mut self, other: i32)
-=
operation. Read moresource§impl SubAssign<i64> for &mut Decimal
impl SubAssign<i64> for &mut Decimal
source§fn sub_assign(&mut self, other: i64)
fn sub_assign(&mut self, other: i64)
-=
operation. Read moresource§impl SubAssign<i64> for Decimal
impl SubAssign<i64> for Decimal
source§fn sub_assign(&mut self, other: i64)
fn sub_assign(&mut self, other: i64)
-=
operation. Read moresource§impl SubAssign<i8> for &mut Decimal
impl SubAssign<i8> for &mut Decimal
source§fn sub_assign(&mut self, other: i8)
fn sub_assign(&mut self, other: i8)
-=
operation. Read moresource§impl SubAssign<i8> for Decimal
impl SubAssign<i8> for Decimal
source§fn sub_assign(&mut self, other: i8)
fn sub_assign(&mut self, other: i8)
-=
operation. Read moresource§impl SubAssign<isize> for &mut Decimal
impl SubAssign<isize> for &mut Decimal
source§fn sub_assign(&mut self, other: isize)
fn sub_assign(&mut self, other: isize)
-=
operation. Read moresource§impl SubAssign<isize> for Decimal
impl SubAssign<isize> for Decimal
source§fn sub_assign(&mut self, other: isize)
fn sub_assign(&mut self, other: isize)
-=
operation. Read moresource§impl SubAssign<u128> for &mut Decimal
impl SubAssign<u128> for &mut Decimal
source§fn sub_assign(&mut self, other: u128)
fn sub_assign(&mut self, other: u128)
-=
operation. Read moresource§impl SubAssign<u128> for Decimal
impl SubAssign<u128> for Decimal
source§fn sub_assign(&mut self, other: u128)
fn sub_assign(&mut self, other: u128)
-=
operation. Read moresource§impl SubAssign<u16> for &mut Decimal
impl SubAssign<u16> for &mut Decimal
source§fn sub_assign(&mut self, other: u16)
fn sub_assign(&mut self, other: u16)
-=
operation. Read moresource§impl SubAssign<u16> for Decimal
impl SubAssign<u16> for Decimal
source§fn sub_assign(&mut self, other: u16)
fn sub_assign(&mut self, other: u16)
-=
operation. Read moresource§impl SubAssign<u32> for &mut Decimal
impl SubAssign<u32> for &mut Decimal
source§fn sub_assign(&mut self, other: u32)
fn sub_assign(&mut self, other: u32)
-=
operation. Read moresource§impl SubAssign<u32> for Decimal
impl SubAssign<u32> for Decimal
source§fn sub_assign(&mut self, other: u32)
fn sub_assign(&mut self, other: u32)
-=
operation. Read moresource§impl SubAssign<u64> for &mut Decimal
impl SubAssign<u64> for &mut Decimal
source§fn sub_assign(&mut self, other: u64)
fn sub_assign(&mut self, other: u64)
-=
operation. Read moresource§impl SubAssign<u64> for Decimal
impl SubAssign<u64> for Decimal
source§fn sub_assign(&mut self, other: u64)
fn sub_assign(&mut self, other: u64)
-=
operation. Read moresource§impl SubAssign<u8> for &mut Decimal
impl SubAssign<u8> for &mut Decimal
source§fn sub_assign(&mut self, other: u8)
fn sub_assign(&mut self, other: u8)
-=
operation. Read moresource§impl SubAssign<u8> for Decimal
impl SubAssign<u8> for Decimal
source§fn sub_assign(&mut self, other: u8)
fn sub_assign(&mut self, other: u8)
-=
operation. Read moresource§impl SubAssign<usize> for &mut Decimal
impl SubAssign<usize> for &mut Decimal
source§fn sub_assign(&mut self, other: usize)
fn sub_assign(&mut self, other: usize)
-=
operation. Read moresource§impl SubAssign<usize> for Decimal
impl SubAssign<usize> for Decimal
source§fn sub_assign(&mut self, other: usize)
fn sub_assign(&mut self, other: usize)
-=
operation. Read more