Struct Decimal

Source
pub struct Decimal<const P: u8>
where PrecLimitCheck<{ _ }>: True,
{ /* private fields */ }
Expand description

Represents a decimal number as a coefficient (stored as an i128 value) combined with a type parameter specifying the number of fractional decimal digits.

The type parameter P can be in the range 0 .. MAX_PREC.

Implementations§

Source§

impl<const P: u8> Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source

pub fn eq_zero(&self) -> bool

Returns true if self is equal to zero.

Source

pub fn eq_one(&self) -> bool

Returns true if self is equal to one.

Source

pub fn is_negative(&self) -> bool

Returns true if self is less than zero.

Source

pub fn is_positive(&self) -> bool

Returns true if self is greater than zero.

Source§

impl<const P: u8> Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source

pub fn one() -> Self

Returns the multiplicative identity element of Self, Self::ONE.

Source

pub fn is_one(&self) -> bool

Returns true if self is equal to the multiplicative identity.

Source§

impl<const P: u8> Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source

pub fn abs(&self) -> Self

Returns the absolute value of self.

Source

pub fn floor(&self) -> Self

Returns the largest integral value <= self.

§Panics

Panics with ‘attempt to multiply with overflow’ when called on a value less than

(Decimal::<P>::MIN / 10 ^ P) * 10 ^ P !

§Examples
let d = Dec!(17.5);
assert_eq!(d.floor().to_string(), "17.0");
let d = Dec!(-17.050);
assert_eq!(d.floor().to_string(), "-18.000");
Source

pub fn ceil(&self) -> Self

Returns the smallest integral value >= self.

§Panics

Panics with ‘attempt to multiply with overflow’ when called on a value greater than

(Decimal::<P>::MAX / 10 ^ P) * 10 ^ P !

§Examples
let d = Dec!(17.5);
assert_eq!(d.ceil().to_string(), "18.0");
let d = Dec!(-17.50);
assert_eq!(d.ceil().to_string(), "-17.00");
Source

pub fn trunc(&self) -> Self

Returns the integral part of self.

§Examples
let d = Dec!(17.5);
assert_eq!(d.trunc().to_string(), "17.0");
let d = Dec!(-17.55555);
assert_eq!(d.trunc().to_string(), "-17.00000");
Source

pub fn fract(&self) -> Self

Returns the fractional part of self.

§Examples
let d = Dec!(17.050);
assert_eq!(d.fract().to_string(), "0.050");
let d = Dec!(-17.5);
assert_eq!(d.fract().to_string(), "-0.5");
Source§

impl<const P: u8> Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source

pub const ZERO: Decimal<P>

Additive identity

Source

pub const ONE: Decimal<P>

Multiplicative identity

Source

pub const NEG_ONE: Decimal<P>

Multiplicative negator

Source

pub const TWO: Decimal<P>

Equivalent of 2

Source

pub const TEN: Decimal<P>

Equivalent of 10

Source

pub const MAX: Decimal<P>

Maximum value representable by this type

Source

pub const MIN: Decimal<P>

Minimum value representable by this type

Source

pub const DELTA: Decimal<P>

Smallest absolute difference between two non-equal values of this type

Source

pub const fn precision(self) -> u8

Number of fractional decimal digits

Trait Implementations§

Source§

impl<const P: u8> Add<&Decimal<P>> for &i128
where PrecLimitCheck<{ _ }>: True, i128: Add<Decimal<P>>,

Source§

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

The resulting type after applying the + operator.
Source§

fn add(self, other: &Decimal<P>) -> Self::Output

Performs the + operation. Read more
Source§

impl<const P: u8> Add<&Decimal<P>> for &i16
where PrecLimitCheck<{ _ }>: True, i16: Add<Decimal<P>>,

Source§

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

The resulting type after applying the + operator.
Source§

fn add(self, other: &Decimal<P>) -> Self::Output

Performs the + operation. Read more
Source§

impl<const P: u8> Add<&Decimal<P>> for &i32
where PrecLimitCheck<{ _ }>: True, i32: Add<Decimal<P>>,

Source§

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

The resulting type after applying the + operator.
Source§

fn add(self, other: &Decimal<P>) -> Self::Output

Performs the + operation. Read more
Source§

impl<const P: u8> Add<&Decimal<P>> for &i64
where PrecLimitCheck<{ _ }>: True, i64: Add<Decimal<P>>,

Source§

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

The resulting type after applying the + operator.
Source§

fn add(self, other: &Decimal<P>) -> Self::Output

Performs the + operation. Read more
Source§

impl<const P: u8> Add<&Decimal<P>> for &i8
where PrecLimitCheck<{ _ }>: True, i8: Add<Decimal<P>>,

Source§

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

The resulting type after applying the + operator.
Source§

fn add(self, other: &Decimal<P>) -> Self::Output

Performs the + operation. Read more
Source§

impl<const P: u8> Add<&Decimal<P>> for &u16
where PrecLimitCheck<{ _ }>: True, u16: Add<Decimal<P>>,

Source§

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

The resulting type after applying the + operator.
Source§

fn add(self, other: &Decimal<P>) -> Self::Output

Performs the + operation. Read more
Source§

impl<const P: u8> Add<&Decimal<P>> for &u32
where PrecLimitCheck<{ _ }>: True, u32: Add<Decimal<P>>,

Source§

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

The resulting type after applying the + operator.
Source§

fn add(self, other: &Decimal<P>) -> Self::Output

Performs the + operation. Read more
Source§

impl<const P: u8> Add<&Decimal<P>> for &u64
where PrecLimitCheck<{ _ }>: True, u64: Add<Decimal<P>>,

Source§

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

The resulting type after applying the + operator.
Source§

fn add(self, other: &Decimal<P>) -> Self::Output

Performs the + operation. Read more
Source§

impl<const P: u8> Add<&Decimal<P>> for &u8
where PrecLimitCheck<{ _ }>: True, u8: Add<Decimal<P>>,

Source§

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

The resulting type after applying the + operator.
Source§

fn add(self, other: &Decimal<P>) -> Self::Output

Performs the + operation. Read more
Source§

impl<const P: u8> Add<&Decimal<P>> for i128
where PrecLimitCheck<{ _ }>: True, i128: Add<Decimal<P>>,

Source§

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

The resulting type after applying the + operator.
Source§

fn add(self, other: &Decimal<P>) -> Self::Output

Performs the + operation. Read more
Source§

impl<const P: u8> Add<&Decimal<P>> for i16
where PrecLimitCheck<{ _ }>: True, i16: Add<Decimal<P>>,

Source§

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

The resulting type after applying the + operator.
Source§

fn add(self, other: &Decimal<P>) -> Self::Output

Performs the + operation. Read more
Source§

impl<const P: u8> Add<&Decimal<P>> for i32
where PrecLimitCheck<{ _ }>: True, i32: Add<Decimal<P>>,

Source§

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

The resulting type after applying the + operator.
Source§

fn add(self, other: &Decimal<P>) -> Self::Output

Performs the + operation. Read more
Source§

impl<const P: u8> Add<&Decimal<P>> for i64
where PrecLimitCheck<{ _ }>: True, i64: Add<Decimal<P>>,

Source§

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

The resulting type after applying the + operator.
Source§

fn add(self, other: &Decimal<P>) -> Self::Output

Performs the + operation. Read more
Source§

impl<const P: u8> Add<&Decimal<P>> for i8
where PrecLimitCheck<{ _ }>: True, i8: Add<Decimal<P>>,

Source§

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

The resulting type after applying the + operator.
Source§

fn add(self, other: &Decimal<P>) -> Self::Output

Performs the + operation. Read more
Source§

impl<const P: u8> Add<&Decimal<P>> for u16
where PrecLimitCheck<{ _ }>: True, u16: Add<Decimal<P>>,

Source§

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

The resulting type after applying the + operator.
Source§

fn add(self, other: &Decimal<P>) -> Self::Output

Performs the + operation. Read more
Source§

impl<const P: u8> Add<&Decimal<P>> for u32
where PrecLimitCheck<{ _ }>: True, u32: Add<Decimal<P>>,

Source§

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

The resulting type after applying the + operator.
Source§

fn add(self, other: &Decimal<P>) -> Self::Output

Performs the + operation. Read more
Source§

impl<const P: u8> Add<&Decimal<P>> for u64
where PrecLimitCheck<{ _ }>: True, u64: Add<Decimal<P>>,

Source§

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

The resulting type after applying the + operator.
Source§

fn add(self, other: &Decimal<P>) -> Self::Output

Performs the + operation. Read more
Source§

impl<const P: u8> Add<&Decimal<P>> for u8
where PrecLimitCheck<{ _ }>: True, u8: Add<Decimal<P>>,

Source§

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

The resulting type after applying the + operator.
Source§

fn add(self, other: &Decimal<P>) -> Self::Output

Performs the + operation. Read more
Source§

impl<const P: u8, const Q: u8> Add<&Decimal<Q>> for &Decimal<P>
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, Decimal<P>: Add<Decimal<Q>>,

Source§

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

The resulting type after applying the + operator.
Source§

fn add(self, other: &Decimal<Q>) -> Self::Output

Performs the + operation. Read more
Source§

impl<const P: u8, const Q: u8> Add<&Decimal<Q>> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, Decimal<P>: Add<Decimal<Q>>,

Source§

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

The resulting type after applying the + operator.
Source§

fn add(self, other: &Decimal<Q>) -> Self::Output

Performs the + operation. Read more
Source§

impl<const P: u8> Add<&i128> for &Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Add<i128>,

Source§

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

The resulting type after applying the + operator.
Source§

fn add(self, other: &i128) -> Self::Output

Performs the + operation. Read more
Source§

impl<const P: u8> Add<&i128> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Add<i128>,

Source§

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

The resulting type after applying the + operator.
Source§

fn add(self, other: &i128) -> Self::Output

Performs the + operation. Read more
Source§

impl<const P: u8> Add<&i16> for &Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Add<i16>,

Source§

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

The resulting type after applying the + operator.
Source§

fn add(self, other: &i16) -> Self::Output

Performs the + operation. Read more
Source§

impl<const P: u8> Add<&i16> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Add<i16>,

Source§

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

The resulting type after applying the + operator.
Source§

fn add(self, other: &i16) -> Self::Output

Performs the + operation. Read more
Source§

impl<const P: u8> Add<&i32> for &Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Add<i32>,

Source§

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

The resulting type after applying the + operator.
Source§

fn add(self, other: &i32) -> Self::Output

Performs the + operation. Read more
Source§

impl<const P: u8> Add<&i32> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Add<i32>,

Source§

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

The resulting type after applying the + operator.
Source§

fn add(self, other: &i32) -> Self::Output

Performs the + operation. Read more
Source§

impl<const P: u8> Add<&i64> for &Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Add<i64>,

Source§

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

The resulting type after applying the + operator.
Source§

fn add(self, other: &i64) -> Self::Output

Performs the + operation. Read more
Source§

impl<const P: u8> Add<&i64> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Add<i64>,

Source§

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

The resulting type after applying the + operator.
Source§

fn add(self, other: &i64) -> Self::Output

Performs the + operation. Read more
Source§

impl<const P: u8> Add<&i8> for &Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Add<i8>,

Source§

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

The resulting type after applying the + operator.
Source§

fn add(self, other: &i8) -> Self::Output

Performs the + operation. Read more
Source§

impl<const P: u8> Add<&i8> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Add<i8>,

Source§

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

The resulting type after applying the + operator.
Source§

fn add(self, other: &i8) -> Self::Output

Performs the + operation. Read more
Source§

impl<const P: u8> Add<&u16> for &Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Add<u16>,

Source§

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

The resulting type after applying the + operator.
Source§

fn add(self, other: &u16) -> Self::Output

Performs the + operation. Read more
Source§

impl<const P: u8> Add<&u16> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Add<u16>,

Source§

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

The resulting type after applying the + operator.
Source§

fn add(self, other: &u16) -> Self::Output

Performs the + operation. Read more
Source§

impl<const P: u8> Add<&u32> for &Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Add<u32>,

Source§

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

The resulting type after applying the + operator.
Source§

fn add(self, other: &u32) -> Self::Output

Performs the + operation. Read more
Source§

impl<const P: u8> Add<&u32> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Add<u32>,

Source§

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

The resulting type after applying the + operator.
Source§

fn add(self, other: &u32) -> Self::Output

Performs the + operation. Read more
Source§

impl<const P: u8> Add<&u64> for &Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Add<u64>,

Source§

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

The resulting type after applying the + operator.
Source§

fn add(self, other: &u64) -> Self::Output

Performs the + operation. Read more
Source§

impl<const P: u8> Add<&u64> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Add<u64>,

Source§

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

The resulting type after applying the + operator.
Source§

fn add(self, other: &u64) -> Self::Output

Performs the + operation. Read more
Source§

impl<const P: u8> Add<&u8> for &Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Add<u8>,

Source§

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

The resulting type after applying the + operator.
Source§

fn add(self, other: &u8) -> Self::Output

Performs the + operation. Read more
Source§

impl<const P: u8> Add<&u8> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Add<u8>,

Source§

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

The resulting type after applying the + operator.
Source§

fn add(self, other: &u8) -> Self::Output

Performs the + operation. Read more
Source§

impl<'a, const P: u8> Add<Decimal<P>> for &'a i128
where PrecLimitCheck<{ _ }>: True, i128: Add<Decimal<P>>,

Source§

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

The resulting type after applying the + operator.
Source§

fn add(self, other: Decimal<P>) -> Self::Output

Performs the + operation. Read more
Source§

impl<'a, const P: u8> Add<Decimal<P>> for &'a i16
where PrecLimitCheck<{ _ }>: True, i16: Add<Decimal<P>>,

Source§

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

The resulting type after applying the + operator.
Source§

fn add(self, other: Decimal<P>) -> Self::Output

Performs the + operation. Read more
Source§

impl<'a, const P: u8> Add<Decimal<P>> for &'a i32
where PrecLimitCheck<{ _ }>: True, i32: Add<Decimal<P>>,

Source§

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

The resulting type after applying the + operator.
Source§

fn add(self, other: Decimal<P>) -> Self::Output

Performs the + operation. Read more
Source§

impl<'a, const P: u8> Add<Decimal<P>> for &'a i64
where PrecLimitCheck<{ _ }>: True, i64: Add<Decimal<P>>,

Source§

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

The resulting type after applying the + operator.
Source§

fn add(self, other: Decimal<P>) -> Self::Output

Performs the + operation. Read more
Source§

impl<'a, const P: u8> Add<Decimal<P>> for &'a i8
where PrecLimitCheck<{ _ }>: True, i8: Add<Decimal<P>>,

Source§

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

The resulting type after applying the + operator.
Source§

fn add(self, other: Decimal<P>) -> Self::Output

Performs the + operation. Read more
Source§

impl<'a, const P: u8> Add<Decimal<P>> for &'a u16
where PrecLimitCheck<{ _ }>: True, u16: Add<Decimal<P>>,

Source§

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

The resulting type after applying the + operator.
Source§

fn add(self, other: Decimal<P>) -> Self::Output

Performs the + operation. Read more
Source§

impl<'a, const P: u8> Add<Decimal<P>> for &'a u32
where PrecLimitCheck<{ _ }>: True, u32: Add<Decimal<P>>,

Source§

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

The resulting type after applying the + operator.
Source§

fn add(self, other: Decimal<P>) -> Self::Output

Performs the + operation. Read more
Source§

impl<'a, const P: u8> Add<Decimal<P>> for &'a u64
where PrecLimitCheck<{ _ }>: True, u64: Add<Decimal<P>>,

Source§

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

The resulting type after applying the + operator.
Source§

fn add(self, other: Decimal<P>) -> Self::Output

Performs the + operation. Read more
Source§

impl<'a, const P: u8> Add<Decimal<P>> for &'a u8
where PrecLimitCheck<{ _ }>: True, u8: Add<Decimal<P>>,

Source§

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

The resulting type after applying the + operator.
Source§

fn add(self, other: Decimal<P>) -> Self::Output

Performs the + operation. Read more
Source§

impl<const P: u8> Add<Decimal<P>> for i128
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<P>

The resulting type after applying the + operator.
Source§

fn add(self, other: Decimal<P>) -> Self::Output

Performs the + operation. Read more
Source§

impl<const P: u8> Add<Decimal<P>> for i16
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<P>

The resulting type after applying the + operator.
Source§

fn add(self, other: Decimal<P>) -> Self::Output

Performs the + operation. Read more
Source§

impl<const P: u8> Add<Decimal<P>> for i32
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<P>

The resulting type after applying the + operator.
Source§

fn add(self, other: Decimal<P>) -> Self::Output

Performs the + operation. Read more
Source§

impl<const P: u8> Add<Decimal<P>> for i64
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<P>

The resulting type after applying the + operator.
Source§

fn add(self, other: Decimal<P>) -> Self::Output

Performs the + operation. Read more
Source§

impl<const P: u8> Add<Decimal<P>> for i8
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<P>

The resulting type after applying the + operator.
Source§

fn add(self, other: Decimal<P>) -> Self::Output

Performs the + operation. Read more
Source§

impl<const P: u8> Add<Decimal<P>> for u16
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<P>

The resulting type after applying the + operator.
Source§

fn add(self, other: Decimal<P>) -> Self::Output

Performs the + operation. Read more
Source§

impl<const P: u8> Add<Decimal<P>> for u32
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<P>

The resulting type after applying the + operator.
Source§

fn add(self, other: Decimal<P>) -> Self::Output

Performs the + operation. Read more
Source§

impl<const P: u8> Add<Decimal<P>> for u64
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<P>

The resulting type after applying the + operator.
Source§

fn add(self, other: Decimal<P>) -> Self::Output

Performs the + operation. Read more
Source§

impl<const P: u8> Add<Decimal<P>> for u8
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<P>

The resulting type after applying the + operator.
Source§

fn add(self, other: Decimal<P>) -> Self::Output

Performs the + operation. Read more
Source§

impl<'a, const P: u8, const Q: u8> Add<Decimal<Q>> for &'a Decimal<P>
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, Decimal<P>: Add<Decimal<Q>>,

Source§

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

The resulting type after applying the + operator.
Source§

fn add(self, other: Decimal<Q>) -> Self::Output

Performs the + operation. Read more
Source§

impl<const P: u8, const Q: u8> Add<Decimal<Q>> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<{ const_max_u8(P, Q) }>

The resulting type after applying the + operator.
Source§

fn add(self, other: Decimal<Q>) -> Self::Output

Performs the + operation. Read more
Source§

impl<'a, const P: u8> Add<i128> for &'a Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Add<i128>,

Source§

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

The resulting type after applying the + operator.
Source§

fn add(self, other: i128) -> Self::Output

Performs the + operation. Read more
Source§

impl<const P: u8> Add<i128> for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<P>

The resulting type after applying the + operator.
Source§

fn add(self, other: i128) -> Self::Output

Performs the + operation. Read more
Source§

impl<'a, const P: u8> Add<i16> for &'a Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Add<i16>,

Source§

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

The resulting type after applying the + operator.
Source§

fn add(self, other: i16) -> Self::Output

Performs the + operation. Read more
Source§

impl<const P: u8> Add<i16> for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<P>

The resulting type after applying the + operator.
Source§

fn add(self, other: i16) -> Self::Output

Performs the + operation. Read more
Source§

impl<'a, const P: u8> Add<i32> for &'a Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Add<i32>,

Source§

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

The resulting type after applying the + operator.
Source§

fn add(self, other: i32) -> Self::Output

Performs the + operation. Read more
Source§

impl<const P: u8> Add<i32> for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<P>

The resulting type after applying the + operator.
Source§

fn add(self, other: i32) -> Self::Output

Performs the + operation. Read more
Source§

impl<'a, const P: u8> Add<i64> for &'a Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Add<i64>,

Source§

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

The resulting type after applying the + operator.
Source§

fn add(self, other: i64) -> Self::Output

Performs the + operation. Read more
Source§

impl<const P: u8> Add<i64> for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<P>

The resulting type after applying the + operator.
Source§

fn add(self, other: i64) -> Self::Output

Performs the + operation. Read more
Source§

impl<'a, const P: u8> Add<i8> for &'a Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Add<i8>,

Source§

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

The resulting type after applying the + operator.
Source§

fn add(self, other: i8) -> Self::Output

Performs the + operation. Read more
Source§

impl<const P: u8> Add<i8> for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<P>

The resulting type after applying the + operator.
Source§

fn add(self, other: i8) -> Self::Output

Performs the + operation. Read more
Source§

impl<'a, const P: u8> Add<u16> for &'a Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Add<u16>,

Source§

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

The resulting type after applying the + operator.
Source§

fn add(self, other: u16) -> Self::Output

Performs the + operation. Read more
Source§

impl<const P: u8> Add<u16> for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<P>

The resulting type after applying the + operator.
Source§

fn add(self, other: u16) -> Self::Output

Performs the + operation. Read more
Source§

impl<'a, const P: u8> Add<u32> for &'a Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Add<u32>,

Source§

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

The resulting type after applying the + operator.
Source§

fn add(self, other: u32) -> Self::Output

Performs the + operation. Read more
Source§

impl<const P: u8> Add<u32> for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<P>

The resulting type after applying the + operator.
Source§

fn add(self, other: u32) -> Self::Output

Performs the + operation. Read more
Source§

impl<'a, const P: u8> Add<u64> for &'a Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Add<u64>,

Source§

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

The resulting type after applying the + operator.
Source§

fn add(self, other: u64) -> Self::Output

Performs the + operation. Read more
Source§

impl<const P: u8> Add<u64> for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<P>

The resulting type after applying the + operator.
Source§

fn add(self, other: u64) -> Self::Output

Performs the + operation. Read more
Source§

impl<'a, const P: u8> Add<u8> for &'a Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Add<u8>,

Source§

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

The resulting type after applying the + operator.
Source§

fn add(self, other: u8) -> Self::Output

Performs the + operation. Read more
Source§

impl<const P: u8> Add<u8> for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<P>

The resulting type after applying the + operator.
Source§

fn add(self, other: u8) -> Self::Output

Performs the + operation. Read more
Source§

impl<const P: u8, T> AddAssign<T> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Add<T, Output = Self>,

Source§

fn add_assign(&mut self, other: T)

Performs the += operation. Read more
Source§

impl<const P: u8> Clone for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

fn clone(&self) -> Decimal<P>

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<const P: u8> Debug for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

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

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

impl<const P: u8> Default for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

fn default() -> Self

Default value: Decimal::<P>::ZERO

Source§

impl<const P: u8> Display for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

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

Formats the value using the given formatter.

If the format specifies less fractional digits than self.precision(), the value gets rounded according to the default rounding mode.

§Examples:
let d = Dec!(-1234.56);
assert_eq!(format!("{}", d), "-1234.56");
assert_eq!(format!("{:014.3}", d), "-000001234.560");
assert_eq!(format!("{:10.1}", d), "   -1234.6");
Source§

impl<const P: u8> Div<&Decimal<P>> for &i128
where PrecLimitCheck<{ _ }>: True, i128: Div<Decimal<P>>,

Source§

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

The resulting type after applying the / operator.
Source§

fn div(self, other: &Decimal<P>) -> Self::Output

Performs the / operation. Read more
Source§

impl<const P: u8> Div<&Decimal<P>> for &i16
where PrecLimitCheck<{ _ }>: True, i16: Div<Decimal<P>>,

Source§

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

The resulting type after applying the / operator.
Source§

fn div(self, other: &Decimal<P>) -> Self::Output

Performs the / operation. Read more
Source§

impl<const P: u8> Div<&Decimal<P>> for &i32
where PrecLimitCheck<{ _ }>: True, i32: Div<Decimal<P>>,

Source§

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

The resulting type after applying the / operator.
Source§

fn div(self, other: &Decimal<P>) -> Self::Output

Performs the / operation. Read more
Source§

impl<const P: u8> Div<&Decimal<P>> for &i64
where PrecLimitCheck<{ _ }>: True, i64: Div<Decimal<P>>,

Source§

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

The resulting type after applying the / operator.
Source§

fn div(self, other: &Decimal<P>) -> Self::Output

Performs the / operation. Read more
Source§

impl<const P: u8> Div<&Decimal<P>> for &i8
where PrecLimitCheck<{ _ }>: True, i8: Div<Decimal<P>>,

Source§

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

The resulting type after applying the / operator.
Source§

fn div(self, other: &Decimal<P>) -> Self::Output

Performs the / operation. Read more
Source§

impl<const P: u8> Div<&Decimal<P>> for &u16
where PrecLimitCheck<{ _ }>: True, u16: Div<Decimal<P>>,

Source§

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

The resulting type after applying the / operator.
Source§

fn div(self, other: &Decimal<P>) -> Self::Output

Performs the / operation. Read more
Source§

impl<const P: u8> Div<&Decimal<P>> for &u32
where PrecLimitCheck<{ _ }>: True, u32: Div<Decimal<P>>,

Source§

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

The resulting type after applying the / operator.
Source§

fn div(self, other: &Decimal<P>) -> Self::Output

Performs the / operation. Read more
Source§

impl<const P: u8> Div<&Decimal<P>> for &u64
where PrecLimitCheck<{ _ }>: True, u64: Div<Decimal<P>>,

Source§

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

The resulting type after applying the / operator.
Source§

fn div(self, other: &Decimal<P>) -> Self::Output

Performs the / operation. Read more
Source§

impl<const P: u8> Div<&Decimal<P>> for &u8
where PrecLimitCheck<{ _ }>: True, u8: Div<Decimal<P>>,

Source§

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

The resulting type after applying the / operator.
Source§

fn div(self, other: &Decimal<P>) -> Self::Output

Performs the / operation. Read more
Source§

impl<const P: u8> Div<&Decimal<P>> for i128
where PrecLimitCheck<{ _ }>: True, i128: Div<Decimal<P>>,

Source§

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

The resulting type after applying the / operator.
Source§

fn div(self, other: &Decimal<P>) -> Self::Output

Performs the / operation. Read more
Source§

impl<const P: u8> Div<&Decimal<P>> for i16
where PrecLimitCheck<{ _ }>: True, i16: Div<Decimal<P>>,

Source§

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

The resulting type after applying the / operator.
Source§

fn div(self, other: &Decimal<P>) -> Self::Output

Performs the / operation. Read more
Source§

impl<const P: u8> Div<&Decimal<P>> for i32
where PrecLimitCheck<{ _ }>: True, i32: Div<Decimal<P>>,

Source§

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

The resulting type after applying the / operator.
Source§

fn div(self, other: &Decimal<P>) -> Self::Output

Performs the / operation. Read more
Source§

impl<const P: u8> Div<&Decimal<P>> for i64
where PrecLimitCheck<{ _ }>: True, i64: Div<Decimal<P>>,

Source§

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

The resulting type after applying the / operator.
Source§

fn div(self, other: &Decimal<P>) -> Self::Output

Performs the / operation. Read more
Source§

impl<const P: u8> Div<&Decimal<P>> for i8
where PrecLimitCheck<{ _ }>: True, i8: Div<Decimal<P>>,

Source§

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

The resulting type after applying the / operator.
Source§

fn div(self, other: &Decimal<P>) -> Self::Output

Performs the / operation. Read more
Source§

impl<const P: u8> Div<&Decimal<P>> for u16
where PrecLimitCheck<{ _ }>: True, u16: Div<Decimal<P>>,

Source§

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

The resulting type after applying the / operator.
Source§

fn div(self, other: &Decimal<P>) -> Self::Output

Performs the / operation. Read more
Source§

impl<const P: u8> Div<&Decimal<P>> for u32
where PrecLimitCheck<{ _ }>: True, u32: Div<Decimal<P>>,

Source§

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

The resulting type after applying the / operator.
Source§

fn div(self, other: &Decimal<P>) -> Self::Output

Performs the / operation. Read more
Source§

impl<const P: u8> Div<&Decimal<P>> for u64
where PrecLimitCheck<{ _ }>: True, u64: Div<Decimal<P>>,

Source§

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

The resulting type after applying the / operator.
Source§

fn div(self, other: &Decimal<P>) -> Self::Output

Performs the / operation. Read more
Source§

impl<const P: u8> Div<&Decimal<P>> for u8
where PrecLimitCheck<{ _ }>: True, u8: Div<Decimal<P>>,

Source§

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

The resulting type after applying the / operator.
Source§

fn div(self, other: &Decimal<P>) -> Self::Output

Performs the / operation. Read more
Source§

impl<const P: u8, const Q: u8> Div<&Decimal<Q>> for &Decimal<P>
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, Decimal<P>: Div<Decimal<Q>>,

Source§

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

The resulting type after applying the / operator.
Source§

fn div(self, other: &Decimal<Q>) -> Self::Output

Performs the / operation. Read more
Source§

impl<const P: u8, const Q: u8> Div<&Decimal<Q>> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, Decimal<P>: Div<Decimal<Q>>,

Source§

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

The resulting type after applying the / operator.
Source§

fn div(self, other: &Decimal<Q>) -> Self::Output

Performs the / operation. Read more
Source§

impl<const P: u8> Div<&i128> for &Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Div<i128>,

Source§

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

The resulting type after applying the / operator.
Source§

fn div(self, other: &i128) -> Self::Output

Performs the / operation. Read more
Source§

impl<const P: u8> Div<&i128> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Div<i128>,

Source§

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

The resulting type after applying the / operator.
Source§

fn div(self, other: &i128) -> Self::Output

Performs the / operation. Read more
Source§

impl<const P: u8> Div<&i16> for &Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Div<i16>,

Source§

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

The resulting type after applying the / operator.
Source§

fn div(self, other: &i16) -> Self::Output

Performs the / operation. Read more
Source§

impl<const P: u8> Div<&i16> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Div<i16>,

Source§

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

The resulting type after applying the / operator.
Source§

fn div(self, other: &i16) -> Self::Output

Performs the / operation. Read more
Source§

impl<const P: u8> Div<&i32> for &Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Div<i32>,

Source§

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

The resulting type after applying the / operator.
Source§

fn div(self, other: &i32) -> Self::Output

Performs the / operation. Read more
Source§

impl<const P: u8> Div<&i32> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Div<i32>,

Source§

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

The resulting type after applying the / operator.
Source§

fn div(self, other: &i32) -> Self::Output

Performs the / operation. Read more
Source§

impl<const P: u8> Div<&i64> for &Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Div<i64>,

Source§

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

The resulting type after applying the / operator.
Source§

fn div(self, other: &i64) -> Self::Output

Performs the / operation. Read more
Source§

impl<const P: u8> Div<&i64> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Div<i64>,

Source§

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

The resulting type after applying the / operator.
Source§

fn div(self, other: &i64) -> Self::Output

Performs the / operation. Read more
Source§

impl<const P: u8> Div<&i8> for &Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Div<i8>,

Source§

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

The resulting type after applying the / operator.
Source§

fn div(self, other: &i8) -> Self::Output

Performs the / operation. Read more
Source§

impl<const P: u8> Div<&i8> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Div<i8>,

Source§

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

The resulting type after applying the / operator.
Source§

fn div(self, other: &i8) -> Self::Output

Performs the / operation. Read more
Source§

impl<const P: u8> Div<&u16> for &Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Div<u16>,

Source§

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

The resulting type after applying the / operator.
Source§

fn div(self, other: &u16) -> Self::Output

Performs the / operation. Read more
Source§

impl<const P: u8> Div<&u16> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Div<u16>,

Source§

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

The resulting type after applying the / operator.
Source§

fn div(self, other: &u16) -> Self::Output

Performs the / operation. Read more
Source§

impl<const P: u8> Div<&u32> for &Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Div<u32>,

Source§

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

The resulting type after applying the / operator.
Source§

fn div(self, other: &u32) -> Self::Output

Performs the / operation. Read more
Source§

impl<const P: u8> Div<&u32> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Div<u32>,

Source§

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

The resulting type after applying the / operator.
Source§

fn div(self, other: &u32) -> Self::Output

Performs the / operation. Read more
Source§

impl<const P: u8> Div<&u64> for &Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Div<u64>,

Source§

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

The resulting type after applying the / operator.
Source§

fn div(self, other: &u64) -> Self::Output

Performs the / operation. Read more
Source§

impl<const P: u8> Div<&u64> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Div<u64>,

Source§

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

The resulting type after applying the / operator.
Source§

fn div(self, other: &u64) -> Self::Output

Performs the / operation. Read more
Source§

impl<const P: u8> Div<&u8> for &Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Div<u8>,

Source§

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

The resulting type after applying the / operator.
Source§

fn div(self, other: &u8) -> Self::Output

Performs the / operation. Read more
Source§

impl<const P: u8> Div<&u8> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Div<u8>,

Source§

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

The resulting type after applying the / operator.
Source§

fn div(self, other: &u8) -> Self::Output

Performs the / operation. Read more
Source§

impl<'a, const P: u8> Div<Decimal<P>> for &'a i128
where PrecLimitCheck<{ _ }>: True, i128: Div<Decimal<P>>,

Source§

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

The resulting type after applying the / operator.
Source§

fn div(self, other: Decimal<P>) -> Self::Output

Performs the / operation. Read more
Source§

impl<'a, const P: u8> Div<Decimal<P>> for &'a i16
where PrecLimitCheck<{ _ }>: True, i16: Div<Decimal<P>>,

Source§

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

The resulting type after applying the / operator.
Source§

fn div(self, other: Decimal<P>) -> Self::Output

Performs the / operation. Read more
Source§

impl<'a, const P: u8> Div<Decimal<P>> for &'a i32
where PrecLimitCheck<{ _ }>: True, i32: Div<Decimal<P>>,

Source§

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

The resulting type after applying the / operator.
Source§

fn div(self, other: Decimal<P>) -> Self::Output

Performs the / operation. Read more
Source§

impl<'a, const P: u8> Div<Decimal<P>> for &'a i64
where PrecLimitCheck<{ _ }>: True, i64: Div<Decimal<P>>,

Source§

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

The resulting type after applying the / operator.
Source§

fn div(self, other: Decimal<P>) -> Self::Output

Performs the / operation. Read more
Source§

impl<'a, const P: u8> Div<Decimal<P>> for &'a i8
where PrecLimitCheck<{ _ }>: True, i8: Div<Decimal<P>>,

Source§

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

The resulting type after applying the / operator.
Source§

fn div(self, other: Decimal<P>) -> Self::Output

Performs the / operation. Read more
Source§

impl<'a, const P: u8> Div<Decimal<P>> for &'a u16
where PrecLimitCheck<{ _ }>: True, u16: Div<Decimal<P>>,

Source§

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

The resulting type after applying the / operator.
Source§

fn div(self, other: Decimal<P>) -> Self::Output

Performs the / operation. Read more
Source§

impl<'a, const P: u8> Div<Decimal<P>> for &'a u32
where PrecLimitCheck<{ _ }>: True, u32: Div<Decimal<P>>,

Source§

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

The resulting type after applying the / operator.
Source§

fn div(self, other: Decimal<P>) -> Self::Output

Performs the / operation. Read more
Source§

impl<'a, const P: u8> Div<Decimal<P>> for &'a u64
where PrecLimitCheck<{ _ }>: True, u64: Div<Decimal<P>>,

Source§

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

The resulting type after applying the / operator.
Source§

fn div(self, other: Decimal<P>) -> Self::Output

Performs the / operation. Read more
Source§

impl<'a, const P: u8> Div<Decimal<P>> for &'a u8
where PrecLimitCheck<{ _ }>: True, u8: Div<Decimal<P>>,

Source§

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

The resulting type after applying the / operator.
Source§

fn div(self, other: Decimal<P>) -> Self::Output

Performs the / operation. Read more
Source§

impl<const P: u8> Div<Decimal<P>> for i128
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<9>

The resulting type after applying the / operator.
Source§

fn div(self, other: Decimal<P>) -> Self::Output

Performs the / operation. Read more
Source§

impl<const P: u8> Div<Decimal<P>> for i16
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<9>

The resulting type after applying the / operator.
Source§

fn div(self, other: Decimal<P>) -> Self::Output

Performs the / operation. Read more
Source§

impl<const P: u8> Div<Decimal<P>> for i32
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<9>

The resulting type after applying the / operator.
Source§

fn div(self, other: Decimal<P>) -> Self::Output

Performs the / operation. Read more
Source§

impl<const P: u8> Div<Decimal<P>> for i64
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<9>

The resulting type after applying the / operator.
Source§

fn div(self, other: Decimal<P>) -> Self::Output

Performs the / operation. Read more
Source§

impl<const P: u8> Div<Decimal<P>> for i8
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<9>

The resulting type after applying the / operator.
Source§

fn div(self, other: Decimal<P>) -> Self::Output

Performs the / operation. Read more
Source§

impl<const P: u8> Div<Decimal<P>> for u16
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<9>

The resulting type after applying the / operator.
Source§

fn div(self, other: Decimal<P>) -> Self::Output

Performs the / operation. Read more
Source§

impl<const P: u8> Div<Decimal<P>> for u32
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<9>

The resulting type after applying the / operator.
Source§

fn div(self, other: Decimal<P>) -> Self::Output

Performs the / operation. Read more
Source§

impl<const P: u8> Div<Decimal<P>> for u64
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<9>

The resulting type after applying the / operator.
Source§

fn div(self, other: Decimal<P>) -> Self::Output

Performs the / operation. Read more
Source§

impl<const P: u8> Div<Decimal<P>> for u8
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<9>

The resulting type after applying the / operator.
Source§

fn div(self, other: Decimal<P>) -> Self::Output

Performs the / operation. Read more
Source§

impl<'a, const P: u8, const Q: u8> Div<Decimal<Q>> for &'a Decimal<P>
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, Decimal<P>: Div<Decimal<Q>>,

Source§

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

The resulting type after applying the / operator.
Source§

fn div(self, other: Decimal<Q>) -> Self::Output

Performs the / operation. Read more
Source§

impl<const P: u8, const Q: u8> Div<Decimal<Q>> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<9>

The resulting type after applying the / operator.
Source§

fn div(self, other: Decimal<Q>) -> Self::Output

Performs the / operation. Read more
Source§

impl<'a, const P: u8> Div<i128> for &'a Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Div<i128>,

Source§

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

The resulting type after applying the / operator.
Source§

fn div(self, other: i128) -> Self::Output

Performs the / operation. Read more
Source§

impl<const P: u8> Div<i128> for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<9>

The resulting type after applying the / operator.
Source§

fn div(self, other: i128) -> Self::Output

Performs the / operation. Read more
Source§

impl<'a, const P: u8> Div<i16> for &'a Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Div<i16>,

Source§

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

The resulting type after applying the / operator.
Source§

fn div(self, other: i16) -> Self::Output

Performs the / operation. Read more
Source§

impl<const P: u8> Div<i16> for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<9>

The resulting type after applying the / operator.
Source§

fn div(self, other: i16) -> Self::Output

Performs the / operation. Read more
Source§

impl<'a, const P: u8> Div<i32> for &'a Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Div<i32>,

Source§

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

The resulting type after applying the / operator.
Source§

fn div(self, other: i32) -> Self::Output

Performs the / operation. Read more
Source§

impl<const P: u8> Div<i32> for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<9>

The resulting type after applying the / operator.
Source§

fn div(self, other: i32) -> Self::Output

Performs the / operation. Read more
Source§

impl<'a, const P: u8> Div<i64> for &'a Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Div<i64>,

Source§

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

The resulting type after applying the / operator.
Source§

fn div(self, other: i64) -> Self::Output

Performs the / operation. Read more
Source§

impl<const P: u8> Div<i64> for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<9>

The resulting type after applying the / operator.
Source§

fn div(self, other: i64) -> Self::Output

Performs the / operation. Read more
Source§

impl<'a, const P: u8> Div<i8> for &'a Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Div<i8>,

Source§

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

The resulting type after applying the / operator.
Source§

fn div(self, other: i8) -> Self::Output

Performs the / operation. Read more
Source§

impl<const P: u8> Div<i8> for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<9>

The resulting type after applying the / operator.
Source§

fn div(self, other: i8) -> Self::Output

Performs the / operation. Read more
Source§

impl<'a, const P: u8> Div<u16> for &'a Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Div<u16>,

Source§

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

The resulting type after applying the / operator.
Source§

fn div(self, other: u16) -> Self::Output

Performs the / operation. Read more
Source§

impl<const P: u8> Div<u16> for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<9>

The resulting type after applying the / operator.
Source§

fn div(self, other: u16) -> Self::Output

Performs the / operation. Read more
Source§

impl<'a, const P: u8> Div<u32> for &'a Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Div<u32>,

Source§

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

The resulting type after applying the / operator.
Source§

fn div(self, other: u32) -> Self::Output

Performs the / operation. Read more
Source§

impl<const P: u8> Div<u32> for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<9>

The resulting type after applying the / operator.
Source§

fn div(self, other: u32) -> Self::Output

Performs the / operation. Read more
Source§

impl<'a, const P: u8> Div<u64> for &'a Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Div<u64>,

Source§

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

The resulting type after applying the / operator.
Source§

fn div(self, other: u64) -> Self::Output

Performs the / operation. Read more
Source§

impl<const P: u8> Div<u64> for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<9>

The resulting type after applying the / operator.
Source§

fn div(self, other: u64) -> Self::Output

Performs the / operation. Read more
Source§

impl<'a, const P: u8> Div<u8> for &'a Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Div<u8>,

Source§

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

The resulting type after applying the / operator.
Source§

fn div(self, other: u8) -> Self::Output

Performs the / operation. Read more
Source§

impl<const P: u8> Div<u8> for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<9>

The resulting type after applying the / operator.
Source§

fn div(self, other: u8) -> Self::Output

Performs the / operation. Read more
Source§

impl<const P: u8, T> DivAssign<T> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Div<T, Output = Self>,

Source§

fn div_assign(&mut self, other: T)

Performs the /= operation. Read more
Source§

impl<const P: u8, const R: u8> DivRounded<&Decimal<P>, Decimal<R>> for &i128
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, i128: DivRounded<Decimal<P>, Decimal<R>>,

Source§

fn div_rounded(self, other: &Decimal<P>) -> Decimal<R>

Returns self / other, rounded as Result.
Source§

impl<const P: u8, const R: u8> DivRounded<&Decimal<P>, Decimal<R>> for &i16
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, i16: DivRounded<Decimal<P>, Decimal<R>>,

Source§

fn div_rounded(self, other: &Decimal<P>) -> Decimal<R>

Returns self / other, rounded as Result.
Source§

impl<const P: u8, const R: u8> DivRounded<&Decimal<P>, Decimal<R>> for &i32
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, i32: DivRounded<Decimal<P>, Decimal<R>>,

Source§

fn div_rounded(self, other: &Decimal<P>) -> Decimal<R>

Returns self / other, rounded as Result.
Source§

impl<const P: u8, const R: u8> DivRounded<&Decimal<P>, Decimal<R>> for &i64
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, i64: DivRounded<Decimal<P>, Decimal<R>>,

Source§

fn div_rounded(self, other: &Decimal<P>) -> Decimal<R>

Returns self / other, rounded as Result.
Source§

impl<const P: u8, const R: u8> DivRounded<&Decimal<P>, Decimal<R>> for &i8
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, i8: DivRounded<Decimal<P>, Decimal<R>>,

Source§

fn div_rounded(self, other: &Decimal<P>) -> Decimal<R>

Returns self / other, rounded as Result.
Source§

impl<const P: u8, const R: u8> DivRounded<&Decimal<P>, Decimal<R>> for &u16
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, u16: DivRounded<Decimal<P>, Decimal<R>>,

Source§

fn div_rounded(self, other: &Decimal<P>) -> Decimal<R>

Returns self / other, rounded as Result.
Source§

impl<const P: u8, const R: u8> DivRounded<&Decimal<P>, Decimal<R>> for &u32
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, u32: DivRounded<Decimal<P>, Decimal<R>>,

Source§

fn div_rounded(self, other: &Decimal<P>) -> Decimal<R>

Returns self / other, rounded as Result.
Source§

impl<const P: u8, const R: u8> DivRounded<&Decimal<P>, Decimal<R>> for &u64
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, u64: DivRounded<Decimal<P>, Decimal<R>>,

Source§

fn div_rounded(self, other: &Decimal<P>) -> Decimal<R>

Returns self / other, rounded as Result.
Source§

impl<const P: u8, const R: u8> DivRounded<&Decimal<P>, Decimal<R>> for &u8
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, u8: DivRounded<Decimal<P>, Decimal<R>>,

Source§

fn div_rounded(self, other: &Decimal<P>) -> Decimal<R>

Returns self / other, rounded as Result.
Source§

impl<const P: u8, const R: u8> DivRounded<&Decimal<P>, Decimal<R>> for i128
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, i128: DivRounded<Decimal<P>, Decimal<R>>,

Source§

fn div_rounded(self, other: &Decimal<P>) -> Decimal<R>

Returns self / other, rounded as Result.
Source§

impl<const P: u8, const R: u8> DivRounded<&Decimal<P>, Decimal<R>> for i16
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, i16: DivRounded<Decimal<P>, Decimal<R>>,

Source§

fn div_rounded(self, other: &Decimal<P>) -> Decimal<R>

Returns self / other, rounded as Result.
Source§

impl<const P: u8, const R: u8> DivRounded<&Decimal<P>, Decimal<R>> for i32
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, i32: DivRounded<Decimal<P>, Decimal<R>>,

Source§

fn div_rounded(self, other: &Decimal<P>) -> Decimal<R>

Returns self / other, rounded as Result.
Source§

impl<const P: u8, const R: u8> DivRounded<&Decimal<P>, Decimal<R>> for i64
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, i64: DivRounded<Decimal<P>, Decimal<R>>,

Source§

fn div_rounded(self, other: &Decimal<P>) -> Decimal<R>

Returns self / other, rounded as Result.
Source§

impl<const P: u8, const R: u8> DivRounded<&Decimal<P>, Decimal<R>> for i8
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, i8: DivRounded<Decimal<P>, Decimal<R>>,

Source§

fn div_rounded(self, other: &Decimal<P>) -> Decimal<R>

Returns self / other, rounded as Result.
Source§

impl<const P: u8, const R: u8> DivRounded<&Decimal<P>, Decimal<R>> for u16
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, u16: DivRounded<Decimal<P>, Decimal<R>>,

Source§

fn div_rounded(self, other: &Decimal<P>) -> Decimal<R>

Returns self / other, rounded as Result.
Source§

impl<const P: u8, const R: u8> DivRounded<&Decimal<P>, Decimal<R>> for u32
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, u32: DivRounded<Decimal<P>, Decimal<R>>,

Source§

fn div_rounded(self, other: &Decimal<P>) -> Decimal<R>

Returns self / other, rounded as Result.
Source§

impl<const P: u8, const R: u8> DivRounded<&Decimal<P>, Decimal<R>> for u64
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, u64: DivRounded<Decimal<P>, Decimal<R>>,

Source§

fn div_rounded(self, other: &Decimal<P>) -> Decimal<R>

Returns self / other, rounded as Result.
Source§

impl<const P: u8, const R: u8> DivRounded<&Decimal<P>, Decimal<R>> for u8
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, u8: DivRounded<Decimal<P>, Decimal<R>>,

Source§

fn div_rounded(self, other: &Decimal<P>) -> Decimal<R>

Returns self / other, rounded as Result.
Source§

impl<const P: u8, const Q: u8, const R: u8> DivRounded<&Decimal<Q>, Decimal<R>> for &Decimal<P>
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, Decimal<P>: DivRounded<Decimal<Q>, Decimal<R>>,

Source§

fn div_rounded(self, other: &Decimal<Q>) -> Decimal<R>

Returns self / other, rounded as Result.
Source§

impl<const P: u8, const Q: u8, const R: u8> DivRounded<&Decimal<Q>, Decimal<R>> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, Decimal<P>: DivRounded<Decimal<Q>, Decimal<R>>,

Source§

fn div_rounded(self, other: &Decimal<Q>) -> Decimal<R>

Returns self / other, rounded as Result.
Source§

impl<const P: u8, const R: u8> DivRounded<&i128, Decimal<R>> for &Decimal<P>
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, Decimal<P>: DivRounded<i128, Decimal<R>>,

Source§

fn div_rounded(self, other: &i128) -> Decimal<R>

Returns self / other, rounded as Result.
Source§

impl<const P: u8, const R: u8> DivRounded<&i128, Decimal<R>> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, Decimal<P>: DivRounded<i128, Decimal<R>>,

Source§

fn div_rounded(self, other: &i128) -> Decimal<R>

Returns self / other, rounded as Result.
Source§

impl<const P: u8, const R: u8> DivRounded<&i16, Decimal<R>> for &Decimal<P>
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, Decimal<P>: DivRounded<i16, Decimal<R>>,

Source§

fn div_rounded(self, other: &i16) -> Decimal<R>

Returns self / other, rounded as Result.
Source§

impl<const P: u8, const R: u8> DivRounded<&i16, Decimal<R>> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, Decimal<P>: DivRounded<i16, Decimal<R>>,

Source§

fn div_rounded(self, other: &i16) -> Decimal<R>

Returns self / other, rounded as Result.
Source§

impl<const P: u8, const R: u8> DivRounded<&i32, Decimal<R>> for &Decimal<P>
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, Decimal<P>: DivRounded<i32, Decimal<R>>,

Source§

fn div_rounded(self, other: &i32) -> Decimal<R>

Returns self / other, rounded as Result.
Source§

impl<const P: u8, const R: u8> DivRounded<&i32, Decimal<R>> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, Decimal<P>: DivRounded<i32, Decimal<R>>,

Source§

fn div_rounded(self, other: &i32) -> Decimal<R>

Returns self / other, rounded as Result.
Source§

impl<const P: u8, const R: u8> DivRounded<&i64, Decimal<R>> for &Decimal<P>
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, Decimal<P>: DivRounded<i64, Decimal<R>>,

Source§

fn div_rounded(self, other: &i64) -> Decimal<R>

Returns self / other, rounded as Result.
Source§

impl<const P: u8, const R: u8> DivRounded<&i64, Decimal<R>> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, Decimal<P>: DivRounded<i64, Decimal<R>>,

Source§

fn div_rounded(self, other: &i64) -> Decimal<R>

Returns self / other, rounded as Result.
Source§

impl<const P: u8, const R: u8> DivRounded<&i8, Decimal<R>> for &Decimal<P>
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, Decimal<P>: DivRounded<i8, Decimal<R>>,

Source§

fn div_rounded(self, other: &i8) -> Decimal<R>

Returns self / other, rounded as Result.
Source§

impl<const P: u8, const R: u8> DivRounded<&i8, Decimal<R>> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, Decimal<P>: DivRounded<i8, Decimal<R>>,

Source§

fn div_rounded(self, other: &i8) -> Decimal<R>

Returns self / other, rounded as Result.
Source§

impl<const P: u8, const R: u8> DivRounded<&u16, Decimal<R>> for &Decimal<P>
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, Decimal<P>: DivRounded<u16, Decimal<R>>,

Source§

fn div_rounded(self, other: &u16) -> Decimal<R>

Returns self / other, rounded as Result.
Source§

impl<const P: u8, const R: u8> DivRounded<&u16, Decimal<R>> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, Decimal<P>: DivRounded<u16, Decimal<R>>,

Source§

fn div_rounded(self, other: &u16) -> Decimal<R>

Returns self / other, rounded as Result.
Source§

impl<const P: u8, const R: u8> DivRounded<&u32, Decimal<R>> for &Decimal<P>
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, Decimal<P>: DivRounded<u32, Decimal<R>>,

Source§

fn div_rounded(self, other: &u32) -> Decimal<R>

Returns self / other, rounded as Result.
Source§

impl<const P: u8, const R: u8> DivRounded<&u32, Decimal<R>> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, Decimal<P>: DivRounded<u32, Decimal<R>>,

Source§

fn div_rounded(self, other: &u32) -> Decimal<R>

Returns self / other, rounded as Result.
Source§

impl<const P: u8, const R: u8> DivRounded<&u64, Decimal<R>> for &Decimal<P>
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, Decimal<P>: DivRounded<u64, Decimal<R>>,

Source§

fn div_rounded(self, other: &u64) -> Decimal<R>

Returns self / other, rounded as Result.
Source§

impl<const P: u8, const R: u8> DivRounded<&u64, Decimal<R>> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, Decimal<P>: DivRounded<u64, Decimal<R>>,

Source§

fn div_rounded(self, other: &u64) -> Decimal<R>

Returns self / other, rounded as Result.
Source§

impl<const P: u8, const R: u8> DivRounded<&u8, Decimal<R>> for &Decimal<P>
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, Decimal<P>: DivRounded<u8, Decimal<R>>,

Source§

fn div_rounded(self, other: &u8) -> Decimal<R>

Returns self / other, rounded as Result.
Source§

impl<const P: u8, const R: u8> DivRounded<&u8, Decimal<R>> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, Decimal<P>: DivRounded<u8, Decimal<R>>,

Source§

fn div_rounded(self, other: &u8) -> Decimal<R>

Returns self / other, rounded as Result.
Source§

impl<'a, const P: u8, const R: u8> DivRounded<Decimal<P>, Decimal<R>> for &'a i128
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, i128: DivRounded<Decimal<P>, Decimal<R>>,

Source§

fn div_rounded(self, other: Decimal<P>) -> Decimal<R>

Returns self / other, rounded as Result.
Source§

impl<'a, const P: u8, const R: u8> DivRounded<Decimal<P>, Decimal<R>> for &'a i16
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, i16: DivRounded<Decimal<P>, Decimal<R>>,

Source§

fn div_rounded(self, other: Decimal<P>) -> Decimal<R>

Returns self / other, rounded as Result.
Source§

impl<'a, const P: u8, const R: u8> DivRounded<Decimal<P>, Decimal<R>> for &'a i32
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, i32: DivRounded<Decimal<P>, Decimal<R>>,

Source§

fn div_rounded(self, other: Decimal<P>) -> Decimal<R>

Returns self / other, rounded as Result.
Source§

impl<'a, const P: u8, const R: u8> DivRounded<Decimal<P>, Decimal<R>> for &'a i64
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, i64: DivRounded<Decimal<P>, Decimal<R>>,

Source§

fn div_rounded(self, other: Decimal<P>) -> Decimal<R>

Returns self / other, rounded as Result.
Source§

impl<'a, const P: u8, const R: u8> DivRounded<Decimal<P>, Decimal<R>> for &'a i8
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, i8: DivRounded<Decimal<P>, Decimal<R>>,

Source§

fn div_rounded(self, other: Decimal<P>) -> Decimal<R>

Returns self / other, rounded as Result.
Source§

impl<'a, const P: u8, const R: u8> DivRounded<Decimal<P>, Decimal<R>> for &'a u16
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, u16: DivRounded<Decimal<P>, Decimal<R>>,

Source§

fn div_rounded(self, other: Decimal<P>) -> Decimal<R>

Returns self / other, rounded as Result.
Source§

impl<'a, const P: u8, const R: u8> DivRounded<Decimal<P>, Decimal<R>> for &'a u32
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, u32: DivRounded<Decimal<P>, Decimal<R>>,

Source§

fn div_rounded(self, other: Decimal<P>) -> Decimal<R>

Returns self / other, rounded as Result.
Source§

impl<'a, const P: u8, const R: u8> DivRounded<Decimal<P>, Decimal<R>> for &'a u64
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, u64: DivRounded<Decimal<P>, Decimal<R>>,

Source§

fn div_rounded(self, other: Decimal<P>) -> Decimal<R>

Returns self / other, rounded as Result.
Source§

impl<'a, const P: u8, const R: u8> DivRounded<Decimal<P>, Decimal<R>> for &'a u8
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, u8: DivRounded<Decimal<P>, Decimal<R>>,

Source§

fn div_rounded(self, other: Decimal<P>) -> Decimal<R>

Returns self / other, rounded as Result.
Source§

impl<const P: u8, const R: u8> DivRounded<Decimal<P>, Decimal<R>> for i128
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True,

Source§

fn div_rounded(self, other: Decimal<P>) -> Decimal<R>

Returns self / other, rounded as Result.
Source§

impl<const P: u8, const R: u8> DivRounded<Decimal<P>, Decimal<R>> for i16
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True,

Source§

fn div_rounded(self, other: Decimal<P>) -> Decimal<R>

Returns self / other, rounded as Result.
Source§

impl<const P: u8, const R: u8> DivRounded<Decimal<P>, Decimal<R>> for i32
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True,

Source§

fn div_rounded(self, other: Decimal<P>) -> Decimal<R>

Returns self / other, rounded as Result.
Source§

impl<const P: u8, const R: u8> DivRounded<Decimal<P>, Decimal<R>> for i64
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True,

Source§

fn div_rounded(self, other: Decimal<P>) -> Decimal<R>

Returns self / other, rounded as Result.
Source§

impl<const P: u8, const R: u8> DivRounded<Decimal<P>, Decimal<R>> for i8
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True,

Source§

fn div_rounded(self, other: Decimal<P>) -> Decimal<R>

Returns self / other, rounded as Result.
Source§

impl<const P: u8, const R: u8> DivRounded<Decimal<P>, Decimal<R>> for u16
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True,

Source§

fn div_rounded(self, other: Decimal<P>) -> Decimal<R>

Returns self / other, rounded as Result.
Source§

impl<const P: u8, const R: u8> DivRounded<Decimal<P>, Decimal<R>> for u32
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True,

Source§

fn div_rounded(self, other: Decimal<P>) -> Decimal<R>

Returns self / other, rounded as Result.
Source§

impl<const P: u8, const R: u8> DivRounded<Decimal<P>, Decimal<R>> for u64
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True,

Source§

fn div_rounded(self, other: Decimal<P>) -> Decimal<R>

Returns self / other, rounded as Result.
Source§

impl<const P: u8, const R: u8> DivRounded<Decimal<P>, Decimal<R>> for u8
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True,

Source§

fn div_rounded(self, other: Decimal<P>) -> Decimal<R>

Returns self / other, rounded as Result.
Source§

impl<'a, const P: u8, const Q: u8, const R: u8> DivRounded<Decimal<Q>, Decimal<R>> for &'a Decimal<P>
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, Decimal<P>: DivRounded<Decimal<Q>, Decimal<R>>,

Source§

fn div_rounded(self, other: Decimal<Q>) -> Decimal<R>

Returns self / other, rounded as Result.
Source§

impl<const P: u8, const Q: u8, const R: u8> DivRounded<Decimal<Q>, Decimal<R>> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True,

Source§

fn div_rounded(self, other: Decimal<Q>) -> Decimal<R>

Returns self / other, rounded as Result.
Source§

impl<'a, const P: u8, const R: u8> DivRounded<i128, Decimal<R>> for &'a Decimal<P>
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, Decimal<P>: DivRounded<i128, Decimal<R>>,

Source§

fn div_rounded(self, other: i128) -> Decimal<R>

Returns self / other, rounded as Result.
Source§

impl<const P: u8, const R: u8> DivRounded<i128, Decimal<R>> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True,

Source§

fn div_rounded(self, other: i128) -> Decimal<R>

Returns self / other, rounded as Result.
Source§

impl<'a, const P: u8, const R: u8> DivRounded<i16, Decimal<R>> for &'a Decimal<P>
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, Decimal<P>: DivRounded<i16, Decimal<R>>,

Source§

fn div_rounded(self, other: i16) -> Decimal<R>

Returns self / other, rounded as Result.
Source§

impl<const P: u8, const R: u8> DivRounded<i16, Decimal<R>> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True,

Source§

fn div_rounded(self, other: i16) -> Decimal<R>

Returns self / other, rounded as Result.
Source§

impl<'a, const P: u8, const R: u8> DivRounded<i32, Decimal<R>> for &'a Decimal<P>
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, Decimal<P>: DivRounded<i32, Decimal<R>>,

Source§

fn div_rounded(self, other: i32) -> Decimal<R>

Returns self / other, rounded as Result.
Source§

impl<const P: u8, const R: u8> DivRounded<i32, Decimal<R>> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True,

Source§

fn div_rounded(self, other: i32) -> Decimal<R>

Returns self / other, rounded as Result.
Source§

impl<'a, const P: u8, const R: u8> DivRounded<i64, Decimal<R>> for &'a Decimal<P>
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, Decimal<P>: DivRounded<i64, Decimal<R>>,

Source§

fn div_rounded(self, other: i64) -> Decimal<R>

Returns self / other, rounded as Result.
Source§

impl<const P: u8, const R: u8> DivRounded<i64, Decimal<R>> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True,

Source§

fn div_rounded(self, other: i64) -> Decimal<R>

Returns self / other, rounded as Result.
Source§

impl<'a, const P: u8, const R: u8> DivRounded<i8, Decimal<R>> for &'a Decimal<P>
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, Decimal<P>: DivRounded<i8, Decimal<R>>,

Source§

fn div_rounded(self, other: i8) -> Decimal<R>

Returns self / other, rounded as Result.
Source§

impl<const P: u8, const R: u8> DivRounded<i8, Decimal<R>> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True,

Source§

fn div_rounded(self, other: i8) -> Decimal<R>

Returns self / other, rounded as Result.
Source§

impl<'a, const P: u8, const R: u8> DivRounded<u16, Decimal<R>> for &'a Decimal<P>
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, Decimal<P>: DivRounded<u16, Decimal<R>>,

Source§

fn div_rounded(self, other: u16) -> Decimal<R>

Returns self / other, rounded as Result.
Source§

impl<const P: u8, const R: u8> DivRounded<u16, Decimal<R>> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True,

Source§

fn div_rounded(self, other: u16) -> Decimal<R>

Returns self / other, rounded as Result.
Source§

impl<'a, const P: u8, const R: u8> DivRounded<u32, Decimal<R>> for &'a Decimal<P>
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, Decimal<P>: DivRounded<u32, Decimal<R>>,

Source§

fn div_rounded(self, other: u32) -> Decimal<R>

Returns self / other, rounded as Result.
Source§

impl<const P: u8, const R: u8> DivRounded<u32, Decimal<R>> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True,

Source§

fn div_rounded(self, other: u32) -> Decimal<R>

Returns self / other, rounded as Result.
Source§

impl<'a, const P: u8, const R: u8> DivRounded<u64, Decimal<R>> for &'a Decimal<P>
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, Decimal<P>: DivRounded<u64, Decimal<R>>,

Source§

fn div_rounded(self, other: u64) -> Decimal<R>

Returns self / other, rounded as Result.
Source§

impl<const P: u8, const R: u8> DivRounded<u64, Decimal<R>> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True,

Source§

fn div_rounded(self, other: u64) -> Decimal<R>

Returns self / other, rounded as Result.
Source§

impl<'a, const P: u8, const R: u8> DivRounded<u8, Decimal<R>> for &'a Decimal<P>
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, Decimal<P>: DivRounded<u8, Decimal<R>>,

Source§

fn div_rounded(self, other: u8) -> Decimal<R>

Returns self / other, rounded as Result.
Source§

impl<const P: u8, const R: u8> DivRounded<u8, Decimal<R>> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True,

Source§

fn div_rounded(self, other: u8) -> Decimal<R>

Returns self / other, rounded as Result.
Source§

impl<const P: u8> From<i16> for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

fn from(i: i16) -> Self

Converts to this type from the input type.
Source§

impl<const P: u8> From<i32> for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

fn from(i: i32) -> Self

Converts to this type from the input type.
Source§

impl<const P: u8> From<i64> for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

fn from(i: i64) -> Self

Converts to this type from the input type.
Source§

impl<const P: u8> From<i8> for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

fn from(i: i8) -> Self

Converts to this type from the input type.
Source§

impl<const P: u8> From<u16> for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

fn from(i: u16) -> Self

Converts to this type from the input type.
Source§

impl<const P: u8> From<u32> for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

fn from(i: u32) -> Self

Converts to this type from the input type.
Source§

impl<const P: u8> From<u64> for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

fn from(i: u64) -> Self

Converts to this type from the input type.
Source§

impl<const P: u8> From<u8> for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

fn from(i: u8) -> Self

Converts to this type from the input type.
Source§

impl<const P: u8> FromStr for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

fn from_str(lit: &str) -> Result<Self, Self::Err>

Convert a number literal into a Decimal<P>.

The literal must be in the form

[+|-]<int>[.<frac>][<e|E>[+|-]<exp>]

or

[+|-].<frac>[<e|E>[+|-]<exp>].

The function returns an error in these cases:

  • An empty string has been given as lit -> ParseDecimalError::Empty
  • lit does not fit one of the two forms given above -> ParseDecimalError::Invalid
  • The number of fractional digits in lit minus the value of the signed exponent in lit exceeds the type parameter P -> ParseDecimalError::PrecLimitExceeded
  • The given decimal literal exceeds the maximum value representable by the type -> ParseDecimalError::MaxValueExceeded
§Examples:
let d = Decimal::<4>::from_str("38.207")?;
assert_eq!(d.to_string(), "38.2070");
let d = Decimal::<7>::from_str("-132.0207e-2")?;
assert_eq!(d.to_string(), "-1.3202070");
Source§

type Err = ParseDecimalError

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

impl<const P: u8> Mul<&Decimal<P>> for &i128
where PrecLimitCheck<{ _ }>: True, i128: Mul<Decimal<P>>,

Source§

type Output = <i128 as Mul<Decimal<P>>>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, other: &Decimal<P>) -> Self::Output

Performs the * operation. Read more
Source§

impl<const P: u8> Mul<&Decimal<P>> for &i16
where PrecLimitCheck<{ _ }>: True, i16: Mul<Decimal<P>>,

Source§

type Output = <i16 as Mul<Decimal<P>>>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, other: &Decimal<P>) -> Self::Output

Performs the * operation. Read more
Source§

impl<const P: u8> Mul<&Decimal<P>> for &i32
where PrecLimitCheck<{ _ }>: True, i32: Mul<Decimal<P>>,

Source§

type Output = <i32 as Mul<Decimal<P>>>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, other: &Decimal<P>) -> Self::Output

Performs the * operation. Read more
Source§

impl<const P: u8> Mul<&Decimal<P>> for &i64
where PrecLimitCheck<{ _ }>: True, i64: Mul<Decimal<P>>,

Source§

type Output = <i64 as Mul<Decimal<P>>>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, other: &Decimal<P>) -> Self::Output

Performs the * operation. Read more
Source§

impl<const P: u8> Mul<&Decimal<P>> for &i8
where PrecLimitCheck<{ _ }>: True, i8: Mul<Decimal<P>>,

Source§

type Output = <i8 as Mul<Decimal<P>>>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, other: &Decimal<P>) -> Self::Output

Performs the * operation. Read more
Source§

impl<const P: u8> Mul<&Decimal<P>> for &u16
where PrecLimitCheck<{ _ }>: True, u16: Mul<Decimal<P>>,

Source§

type Output = <u16 as Mul<Decimal<P>>>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, other: &Decimal<P>) -> Self::Output

Performs the * operation. Read more
Source§

impl<const P: u8> Mul<&Decimal<P>> for &u32
where PrecLimitCheck<{ _ }>: True, u32: Mul<Decimal<P>>,

Source§

type Output = <u32 as Mul<Decimal<P>>>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, other: &Decimal<P>) -> Self::Output

Performs the * operation. Read more
Source§

impl<const P: u8> Mul<&Decimal<P>> for &u64
where PrecLimitCheck<{ _ }>: True, u64: Mul<Decimal<P>>,

Source§

type Output = <u64 as Mul<Decimal<P>>>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, other: &Decimal<P>) -> Self::Output

Performs the * operation. Read more
Source§

impl<const P: u8> Mul<&Decimal<P>> for &u8
where PrecLimitCheck<{ _ }>: True, u8: Mul<Decimal<P>>,

Source§

type Output = <u8 as Mul<Decimal<P>>>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, other: &Decimal<P>) -> Self::Output

Performs the * operation. Read more
Source§

impl<const P: u8> Mul<&Decimal<P>> for i128
where PrecLimitCheck<{ _ }>: True, i128: Mul<Decimal<P>>,

Source§

type Output = <i128 as Mul<Decimal<P>>>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, other: &Decimal<P>) -> Self::Output

Performs the * operation. Read more
Source§

impl<const P: u8> Mul<&Decimal<P>> for i16
where PrecLimitCheck<{ _ }>: True, i16: Mul<Decimal<P>>,

Source§

type Output = <i16 as Mul<Decimal<P>>>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, other: &Decimal<P>) -> Self::Output

Performs the * operation. Read more
Source§

impl<const P: u8> Mul<&Decimal<P>> for i32
where PrecLimitCheck<{ _ }>: True, i32: Mul<Decimal<P>>,

Source§

type Output = <i32 as Mul<Decimal<P>>>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, other: &Decimal<P>) -> Self::Output

Performs the * operation. Read more
Source§

impl<const P: u8> Mul<&Decimal<P>> for i64
where PrecLimitCheck<{ _ }>: True, i64: Mul<Decimal<P>>,

Source§

type Output = <i64 as Mul<Decimal<P>>>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, other: &Decimal<P>) -> Self::Output

Performs the * operation. Read more
Source§

impl<const P: u8> Mul<&Decimal<P>> for i8
where PrecLimitCheck<{ _ }>: True, i8: Mul<Decimal<P>>,

Source§

type Output = <i8 as Mul<Decimal<P>>>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, other: &Decimal<P>) -> Self::Output

Performs the * operation. Read more
Source§

impl<const P: u8> Mul<&Decimal<P>> for u16
where PrecLimitCheck<{ _ }>: True, u16: Mul<Decimal<P>>,

Source§

type Output = <u16 as Mul<Decimal<P>>>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, other: &Decimal<P>) -> Self::Output

Performs the * operation. Read more
Source§

impl<const P: u8> Mul<&Decimal<P>> for u32
where PrecLimitCheck<{ _ }>: True, u32: Mul<Decimal<P>>,

Source§

type Output = <u32 as Mul<Decimal<P>>>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, other: &Decimal<P>) -> Self::Output

Performs the * operation. Read more
Source§

impl<const P: u8> Mul<&Decimal<P>> for u64
where PrecLimitCheck<{ _ }>: True, u64: Mul<Decimal<P>>,

Source§

type Output = <u64 as Mul<Decimal<P>>>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, other: &Decimal<P>) -> Self::Output

Performs the * operation. Read more
Source§

impl<const P: u8> Mul<&Decimal<P>> for u8
where PrecLimitCheck<{ _ }>: True, u8: Mul<Decimal<P>>,

Source§

type Output = <u8 as Mul<Decimal<P>>>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, other: &Decimal<P>) -> Self::Output

Performs the * operation. Read more
Source§

impl<const P: u8, const Q: u8> Mul<&Decimal<Q>> for &Decimal<P>
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, Decimal<P>: Mul<Decimal<Q>>,

Source§

type Output = <Decimal<P> as Mul<Decimal<Q>>>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, other: &Decimal<Q>) -> Self::Output

Performs the * operation. Read more
Source§

impl<const P: u8, const Q: u8> Mul<&Decimal<Q>> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, Decimal<P>: Mul<Decimal<Q>>,

Source§

type Output = <Decimal<P> as Mul<Decimal<Q>>>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, other: &Decimal<Q>) -> Self::Output

Performs the * operation. Read more
Source§

impl<const P: u8> Mul<&i128> for &Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Mul<i128>,

Source§

type Output = <Decimal<P> as Mul<i128>>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, other: &i128) -> Self::Output

Performs the * operation. Read more
Source§

impl<const P: u8> Mul<&i128> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Mul<i128>,

Source§

type Output = <Decimal<P> as Mul<i128>>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, other: &i128) -> Self::Output

Performs the * operation. Read more
Source§

impl<const P: u8> Mul<&i16> for &Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Mul<i16>,

Source§

type Output = <Decimal<P> as Mul<i16>>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, other: &i16) -> Self::Output

Performs the * operation. Read more
Source§

impl<const P: u8> Mul<&i16> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Mul<i16>,

Source§

type Output = <Decimal<P> as Mul<i16>>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, other: &i16) -> Self::Output

Performs the * operation. Read more
Source§

impl<const P: u8> Mul<&i32> for &Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Mul<i32>,

Source§

type Output = <Decimal<P> as Mul<i32>>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, other: &i32) -> Self::Output

Performs the * operation. Read more
Source§

impl<const P: u8> Mul<&i32> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Mul<i32>,

Source§

type Output = <Decimal<P> as Mul<i32>>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, other: &i32) -> Self::Output

Performs the * operation. Read more
Source§

impl<const P: u8> Mul<&i64> for &Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Mul<i64>,

Source§

type Output = <Decimal<P> as Mul<i64>>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, other: &i64) -> Self::Output

Performs the * operation. Read more
Source§

impl<const P: u8> Mul<&i64> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Mul<i64>,

Source§

type Output = <Decimal<P> as Mul<i64>>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, other: &i64) -> Self::Output

Performs the * operation. Read more
Source§

impl<const P: u8> Mul<&i8> for &Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Mul<i8>,

Source§

type Output = <Decimal<P> as Mul<i8>>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, other: &i8) -> Self::Output

Performs the * operation. Read more
Source§

impl<const P: u8> Mul<&i8> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Mul<i8>,

Source§

type Output = <Decimal<P> as Mul<i8>>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, other: &i8) -> Self::Output

Performs the * operation. Read more
Source§

impl<const P: u8> Mul<&u16> for &Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Mul<u16>,

Source§

type Output = <Decimal<P> as Mul<u16>>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, other: &u16) -> Self::Output

Performs the * operation. Read more
Source§

impl<const P: u8> Mul<&u16> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Mul<u16>,

Source§

type Output = <Decimal<P> as Mul<u16>>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, other: &u16) -> Self::Output

Performs the * operation. Read more
Source§

impl<const P: u8> Mul<&u32> for &Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Mul<u32>,

Source§

type Output = <Decimal<P> as Mul<u32>>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, other: &u32) -> Self::Output

Performs the * operation. Read more
Source§

impl<const P: u8> Mul<&u32> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Mul<u32>,

Source§

type Output = <Decimal<P> as Mul<u32>>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, other: &u32) -> Self::Output

Performs the * operation. Read more
Source§

impl<const P: u8> Mul<&u64> for &Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Mul<u64>,

Source§

type Output = <Decimal<P> as Mul<u64>>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, other: &u64) -> Self::Output

Performs the * operation. Read more
Source§

impl<const P: u8> Mul<&u64> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Mul<u64>,

Source§

type Output = <Decimal<P> as Mul<u64>>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, other: &u64) -> Self::Output

Performs the * operation. Read more
Source§

impl<const P: u8> Mul<&u8> for &Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Mul<u8>,

Source§

type Output = <Decimal<P> as Mul<u8>>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, other: &u8) -> Self::Output

Performs the * operation. Read more
Source§

impl<const P: u8> Mul<&u8> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Mul<u8>,

Source§

type Output = <Decimal<P> as Mul<u8>>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, other: &u8) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a, const P: u8> Mul<Decimal<P>> for &'a i128
where PrecLimitCheck<{ _ }>: True, i128: Mul<Decimal<P>>,

Source§

type Output = <i128 as Mul<Decimal<P>>>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, other: Decimal<P>) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a, const P: u8> Mul<Decimal<P>> for &'a i16
where PrecLimitCheck<{ _ }>: True, i16: Mul<Decimal<P>>,

Source§

type Output = <i16 as Mul<Decimal<P>>>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, other: Decimal<P>) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a, const P: u8> Mul<Decimal<P>> for &'a i32
where PrecLimitCheck<{ _ }>: True, i32: Mul<Decimal<P>>,

Source§

type Output = <i32 as Mul<Decimal<P>>>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, other: Decimal<P>) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a, const P: u8> Mul<Decimal<P>> for &'a i64
where PrecLimitCheck<{ _ }>: True, i64: Mul<Decimal<P>>,

Source§

type Output = <i64 as Mul<Decimal<P>>>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, other: Decimal<P>) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a, const P: u8> Mul<Decimal<P>> for &'a i8
where PrecLimitCheck<{ _ }>: True, i8: Mul<Decimal<P>>,

Source§

type Output = <i8 as Mul<Decimal<P>>>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, other: Decimal<P>) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a, const P: u8> Mul<Decimal<P>> for &'a u16
where PrecLimitCheck<{ _ }>: True, u16: Mul<Decimal<P>>,

Source§

type Output = <u16 as Mul<Decimal<P>>>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, other: Decimal<P>) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a, const P: u8> Mul<Decimal<P>> for &'a u32
where PrecLimitCheck<{ _ }>: True, u32: Mul<Decimal<P>>,

Source§

type Output = <u32 as Mul<Decimal<P>>>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, other: Decimal<P>) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a, const P: u8> Mul<Decimal<P>> for &'a u64
where PrecLimitCheck<{ _ }>: True, u64: Mul<Decimal<P>>,

Source§

type Output = <u64 as Mul<Decimal<P>>>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, other: Decimal<P>) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a, const P: u8> Mul<Decimal<P>> for &'a u8
where PrecLimitCheck<{ _ }>: True, u8: Mul<Decimal<P>>,

Source§

type Output = <u8 as Mul<Decimal<P>>>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, other: Decimal<P>) -> Self::Output

Performs the * operation. Read more
Source§

impl<const P: u8> Mul<Decimal<P>> for i128
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<P>

The resulting type after applying the * operator.
Source§

fn mul(self, other: Decimal<P>) -> Self::Output

Performs the * operation. Read more
Source§

impl<const P: u8> Mul<Decimal<P>> for i16
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<P>

The resulting type after applying the * operator.
Source§

fn mul(self, other: Decimal<P>) -> Self::Output

Performs the * operation. Read more
Source§

impl<const P: u8> Mul<Decimal<P>> for i32
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<P>

The resulting type after applying the * operator.
Source§

fn mul(self, other: Decimal<P>) -> Self::Output

Performs the * operation. Read more
Source§

impl<const P: u8> Mul<Decimal<P>> for i64
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<P>

The resulting type after applying the * operator.
Source§

fn mul(self, other: Decimal<P>) -> Self::Output

Performs the * operation. Read more
Source§

impl<const P: u8> Mul<Decimal<P>> for i8
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<P>

The resulting type after applying the * operator.
Source§

fn mul(self, other: Decimal<P>) -> Self::Output

Performs the * operation. Read more
Source§

impl<const P: u8> Mul<Decimal<P>> for u16
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<P>

The resulting type after applying the * operator.
Source§

fn mul(self, other: Decimal<P>) -> Self::Output

Performs the * operation. Read more
Source§

impl<const P: u8> Mul<Decimal<P>> for u32
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<P>

The resulting type after applying the * operator.
Source§

fn mul(self, other: Decimal<P>) -> Self::Output

Performs the * operation. Read more
Source§

impl<const P: u8> Mul<Decimal<P>> for u64
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<P>

The resulting type after applying the * operator.
Source§

fn mul(self, other: Decimal<P>) -> Self::Output

Performs the * operation. Read more
Source§

impl<const P: u8> Mul<Decimal<P>> for u8
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<P>

The resulting type after applying the * operator.
Source§

fn mul(self, other: Decimal<P>) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a, const P: u8, const Q: u8> Mul<Decimal<Q>> for &'a Decimal<P>
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, Decimal<P>: Mul<Decimal<Q>>,

Source§

type Output = <Decimal<P> as Mul<Decimal<Q>>>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, other: Decimal<Q>) -> Self::Output

Performs the * operation. Read more
Source§

impl<const P: u8, const Q: u8> Mul<Decimal<Q>> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<{ const_sum_u8(P, Q) }>

The resulting type after applying the * operator.
Source§

fn mul(self, other: Decimal<Q>) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a, const P: u8> Mul<i128> for &'a Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Mul<i128>,

Source§

type Output = <Decimal<P> as Mul<i128>>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, other: i128) -> Self::Output

Performs the * operation. Read more
Source§

impl<const P: u8> Mul<i128> for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<P>

The resulting type after applying the * operator.
Source§

fn mul(self, other: i128) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a, const P: u8> Mul<i16> for &'a Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Mul<i16>,

Source§

type Output = <Decimal<P> as Mul<i16>>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, other: i16) -> Self::Output

Performs the * operation. Read more
Source§

impl<const P: u8> Mul<i16> for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<P>

The resulting type after applying the * operator.
Source§

fn mul(self, other: i16) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a, const P: u8> Mul<i32> for &'a Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Mul<i32>,

Source§

type Output = <Decimal<P> as Mul<i32>>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, other: i32) -> Self::Output

Performs the * operation. Read more
Source§

impl<const P: u8> Mul<i32> for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<P>

The resulting type after applying the * operator.
Source§

fn mul(self, other: i32) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a, const P: u8> Mul<i64> for &'a Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Mul<i64>,

Source§

type Output = <Decimal<P> as Mul<i64>>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, other: i64) -> Self::Output

Performs the * operation. Read more
Source§

impl<const P: u8> Mul<i64> for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<P>

The resulting type after applying the * operator.
Source§

fn mul(self, other: i64) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a, const P: u8> Mul<i8> for &'a Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Mul<i8>,

Source§

type Output = <Decimal<P> as Mul<i8>>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, other: i8) -> Self::Output

Performs the * operation. Read more
Source§

impl<const P: u8> Mul<i8> for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<P>

The resulting type after applying the * operator.
Source§

fn mul(self, other: i8) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a, const P: u8> Mul<u16> for &'a Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Mul<u16>,

Source§

type Output = <Decimal<P> as Mul<u16>>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, other: u16) -> Self::Output

Performs the * operation. Read more
Source§

impl<const P: u8> Mul<u16> for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<P>

The resulting type after applying the * operator.
Source§

fn mul(self, other: u16) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a, const P: u8> Mul<u32> for &'a Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Mul<u32>,

Source§

type Output = <Decimal<P> as Mul<u32>>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, other: u32) -> Self::Output

Performs the * operation. Read more
Source§

impl<const P: u8> Mul<u32> for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<P>

The resulting type after applying the * operator.
Source§

fn mul(self, other: u32) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a, const P: u8> Mul<u64> for &'a Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Mul<u64>,

Source§

type Output = <Decimal<P> as Mul<u64>>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, other: u64) -> Self::Output

Performs the * operation. Read more
Source§

impl<const P: u8> Mul<u64> for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<P>

The resulting type after applying the * operator.
Source§

fn mul(self, other: u64) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a, const P: u8> Mul<u8> for &'a Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Mul<u8>,

Source§

type Output = <Decimal<P> as Mul<u8>>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, other: u8) -> Self::Output

Performs the * operation. Read more
Source§

impl<const P: u8> Mul<u8> for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<P>

The resulting type after applying the * operator.
Source§

fn mul(self, other: u8) -> Self::Output

Performs the * operation. Read more
Source§

impl<const P: u8, T> MulAssign<T> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Mul<T, Output = Self>,

Source§

fn mul_assign(&mut self, other: T)

Performs the *= operation. Read more
Source§

impl<const P: u8, const Q: u8, const R: u8> MulRounded<&Decimal<Q>, Decimal<R>> for &Decimal<P>
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, Decimal<P>: MulRounded<Decimal<Q>, Decimal<R>>,

Source§

fn mul_rounded(self, other: &Decimal<Q>) -> Decimal<R>

Returns self * other, rounded as Result.
Source§

impl<const P: u8, const Q: u8, const R: u8> MulRounded<&Decimal<Q>, Decimal<R>> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, Decimal<P>: MulRounded<Decimal<Q>, Decimal<R>>,

Source§

fn mul_rounded(self, other: &Decimal<Q>) -> Decimal<R>

Returns self * other, rounded as Result.
Source§

impl<'a, const P: u8, const Q: u8, const R: u8> MulRounded<Decimal<Q>, Decimal<R>> for &'a Decimal<P>
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, Decimal<P>: MulRounded<Decimal<Q>, Decimal<R>>,

Source§

fn mul_rounded(self, other: Decimal<Q>) -> Decimal<R>

Returns self * other, rounded as Result.
Source§

impl<const P: u8, const Q: u8, const R: u8> MulRounded<Decimal<Q>, Decimal<R>> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True,

Source§

fn mul_rounded(self, other: Decimal<Q>) -> Decimal<R>

Returns self * other, rounded as Result.
Source§

impl<const P: u8> Neg for &Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

fn neg(self) -> Self::Output

Returns -self.

#Panics

Panics with ‘attempt to negate with overflow’ when called on Decimal::<P>::MIN!

Source§

type Output = <Decimal<P> as Neg>::Output

The resulting type after applying the - operator.
Source§

impl<const P: u8> Neg for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

fn neg(self) -> Self::Output

Returns -self.

§Panics

Panics with ‘attempt to negate with overflow’ when called on Decimal::<P>::MIN!

Source§

type Output = Decimal<P>

The resulting type after applying the - operator.
Source§

impl<const P: u8> Ord for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

fn cmp(&self, other: &Decimal<P>) -> 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<const P: u8, const Q: u8> PartialEq<Decimal<Q>> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True,

Source§

fn eq(&self, other: &Decimal<Q>) -> 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<const Q: u8> PartialEq<Decimal<Q>> for i128
where PrecLimitCheck<{ _ }>: True, Decimal<Q>: PartialEq<i128>,

Source§

fn eq(&self, other: &Decimal<Q>) -> 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<const Q: u8> PartialEq<Decimal<Q>> for i16
where PrecLimitCheck<{ _ }>: True, Decimal<Q>: PartialEq<i16>,

Source§

fn eq(&self, other: &Decimal<Q>) -> 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<const Q: u8> PartialEq<Decimal<Q>> for i32
where PrecLimitCheck<{ _ }>: True, Decimal<Q>: PartialEq<i32>,

Source§

fn eq(&self, other: &Decimal<Q>) -> 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<const Q: u8> PartialEq<Decimal<Q>> for i64
where PrecLimitCheck<{ _ }>: True, Decimal<Q>: PartialEq<i64>,

Source§

fn eq(&self, other: &Decimal<Q>) -> 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<const Q: u8> PartialEq<Decimal<Q>> for i8
where PrecLimitCheck<{ _ }>: True, Decimal<Q>: PartialEq<i8>,

Source§

fn eq(&self, other: &Decimal<Q>) -> 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<const Q: u8> PartialEq<Decimal<Q>> for u16
where PrecLimitCheck<{ _ }>: True, Decimal<Q>: PartialEq<u16>,

Source§

fn eq(&self, other: &Decimal<Q>) -> 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<const Q: u8> PartialEq<Decimal<Q>> for u32
where PrecLimitCheck<{ _ }>: True, Decimal<Q>: PartialEq<u32>,

Source§

fn eq(&self, other: &Decimal<Q>) -> 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<const Q: u8> PartialEq<Decimal<Q>> for u64
where PrecLimitCheck<{ _ }>: True, Decimal<Q>: PartialEq<u64>,

Source§

fn eq(&self, other: &Decimal<Q>) -> 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<const P: u8> PartialEq<i128> for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

fn eq(&self, other: &i128) -> 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<const P: u8> PartialEq<i16> for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

fn eq(&self, other: &i16) -> 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<const P: u8> PartialEq<i32> for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

fn eq(&self, other: &i32) -> 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<const P: u8> PartialEq<i64> for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

fn eq(&self, other: &i64) -> 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<const P: u8> PartialEq<i8> for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

fn eq(&self, other: &i8) -> 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<const P: u8> PartialEq<u16> for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

fn eq(&self, other: &u16) -> 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<const P: u8> PartialEq<u32> for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

fn eq(&self, other: &u32) -> 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<const P: u8> PartialEq<u64> for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

fn eq(&self, other: &u64) -> 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<const P: u8, const Q: u8> PartialOrd<Decimal<Q>> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True,

Source§

fn partial_cmp(&self, other: &Decimal<Q>) -> 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<const Q: u8> PartialOrd<Decimal<Q>> for i128
where PrecLimitCheck<{ _ }>: True,

Source§

fn partial_cmp(&self, other: &Decimal<Q>) -> 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<const Q: u8> PartialOrd<Decimal<Q>> for i16
where PrecLimitCheck<{ _ }>: True,

Source§

fn partial_cmp(&self, other: &Decimal<Q>) -> 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<const Q: u8> PartialOrd<Decimal<Q>> for i32
where PrecLimitCheck<{ _ }>: True,

Source§

fn partial_cmp(&self, other: &Decimal<Q>) -> 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<const Q: u8> PartialOrd<Decimal<Q>> for i64
where PrecLimitCheck<{ _ }>: True,

Source§

fn partial_cmp(&self, other: &Decimal<Q>) -> 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<const Q: u8> PartialOrd<Decimal<Q>> for i8
where PrecLimitCheck<{ _ }>: True,

Source§

fn partial_cmp(&self, other: &Decimal<Q>) -> 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<const Q: u8> PartialOrd<Decimal<Q>> for u16
where PrecLimitCheck<{ _ }>: True,

Source§

fn partial_cmp(&self, other: &Decimal<Q>) -> 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<const Q: u8> PartialOrd<Decimal<Q>> for u32
where PrecLimitCheck<{ _ }>: True,

Source§

fn partial_cmp(&self, other: &Decimal<Q>) -> 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<const Q: u8> PartialOrd<Decimal<Q>> for u64
where PrecLimitCheck<{ _ }>: True,

Source§

fn partial_cmp(&self, other: &Decimal<Q>) -> 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<const P: u8> PartialOrd<i128> for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

fn partial_cmp(&self, other: &i128) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

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

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<const P: u8> PartialOrd<i16> for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

fn partial_cmp(&self, other: &i16) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

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

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<const P: u8> PartialOrd<i32> for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

fn partial_cmp(&self, other: &i32) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

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

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<const P: u8> PartialOrd<i64> for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

fn partial_cmp(&self, other: &i64) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

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

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<const P: u8> PartialOrd<i8> for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

fn partial_cmp(&self, other: &i8) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

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

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<const P: u8> PartialOrd<u16> for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

fn partial_cmp(&self, other: &u16) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

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

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<const P: u8> PartialOrd<u32> for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

fn partial_cmp(&self, other: &u32) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

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

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<const P: u8> PartialOrd<u64> for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

fn partial_cmp(&self, other: &u64) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

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

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<const P: u8> Rem<&Decimal<P>> for &i128
where PrecLimitCheck<{ _ }>: True, i128: Rem<Decimal<P>>,

Source§

type Output = <i128 as Rem<Decimal<P>>>::Output

The resulting type after applying the % operator.
Source§

fn rem(self, other: &Decimal<P>) -> Self::Output

Performs the % operation. Read more
Source§

impl<const P: u8> Rem<&Decimal<P>> for &i16
where PrecLimitCheck<{ _ }>: True, i16: Rem<Decimal<P>>,

Source§

type Output = <i16 as Rem<Decimal<P>>>::Output

The resulting type after applying the % operator.
Source§

fn rem(self, other: &Decimal<P>) -> Self::Output

Performs the % operation. Read more
Source§

impl<const P: u8> Rem<&Decimal<P>> for &i32
where PrecLimitCheck<{ _ }>: True, i32: Rem<Decimal<P>>,

Source§

type Output = <i32 as Rem<Decimal<P>>>::Output

The resulting type after applying the % operator.
Source§

fn rem(self, other: &Decimal<P>) -> Self::Output

Performs the % operation. Read more
Source§

impl<const P: u8> Rem<&Decimal<P>> for &i64
where PrecLimitCheck<{ _ }>: True, i64: Rem<Decimal<P>>,

Source§

type Output = <i64 as Rem<Decimal<P>>>::Output

The resulting type after applying the % operator.
Source§

fn rem(self, other: &Decimal<P>) -> Self::Output

Performs the % operation. Read more
Source§

impl<const P: u8> Rem<&Decimal<P>> for &i8
where PrecLimitCheck<{ _ }>: True, i8: Rem<Decimal<P>>,

Source§

type Output = <i8 as Rem<Decimal<P>>>::Output

The resulting type after applying the % operator.
Source§

fn rem(self, other: &Decimal<P>) -> Self::Output

Performs the % operation. Read more
Source§

impl<const P: u8> Rem<&Decimal<P>> for &u16
where PrecLimitCheck<{ _ }>: True, u16: Rem<Decimal<P>>,

Source§

type Output = <u16 as Rem<Decimal<P>>>::Output

The resulting type after applying the % operator.
Source§

fn rem(self, other: &Decimal<P>) -> Self::Output

Performs the % operation. Read more
Source§

impl<const P: u8> Rem<&Decimal<P>> for &u32
where PrecLimitCheck<{ _ }>: True, u32: Rem<Decimal<P>>,

Source§

type Output = <u32 as Rem<Decimal<P>>>::Output

The resulting type after applying the % operator.
Source§

fn rem(self, other: &Decimal<P>) -> Self::Output

Performs the % operation. Read more
Source§

impl<const P: u8> Rem<&Decimal<P>> for &u64
where PrecLimitCheck<{ _ }>: True, u64: Rem<Decimal<P>>,

Source§

type Output = <u64 as Rem<Decimal<P>>>::Output

The resulting type after applying the % operator.
Source§

fn rem(self, other: &Decimal<P>) -> Self::Output

Performs the % operation. Read more
Source§

impl<const P: u8> Rem<&Decimal<P>> for &u8
where PrecLimitCheck<{ _ }>: True, u8: Rem<Decimal<P>>,

Source§

type Output = <u8 as Rem<Decimal<P>>>::Output

The resulting type after applying the % operator.
Source§

fn rem(self, other: &Decimal<P>) -> Self::Output

Performs the % operation. Read more
Source§

impl<const P: u8> Rem<&Decimal<P>> for i128
where PrecLimitCheck<{ _ }>: True, i128: Rem<Decimal<P>>,

Source§

type Output = <i128 as Rem<Decimal<P>>>::Output

The resulting type after applying the % operator.
Source§

fn rem(self, other: &Decimal<P>) -> Self::Output

Performs the % operation. Read more
Source§

impl<const P: u8> Rem<&Decimal<P>> for i16
where PrecLimitCheck<{ _ }>: True, i16: Rem<Decimal<P>>,

Source§

type Output = <i16 as Rem<Decimal<P>>>::Output

The resulting type after applying the % operator.
Source§

fn rem(self, other: &Decimal<P>) -> Self::Output

Performs the % operation. Read more
Source§

impl<const P: u8> Rem<&Decimal<P>> for i32
where PrecLimitCheck<{ _ }>: True, i32: Rem<Decimal<P>>,

Source§

type Output = <i32 as Rem<Decimal<P>>>::Output

The resulting type after applying the % operator.
Source§

fn rem(self, other: &Decimal<P>) -> Self::Output

Performs the % operation. Read more
Source§

impl<const P: u8> Rem<&Decimal<P>> for i64
where PrecLimitCheck<{ _ }>: True, i64: Rem<Decimal<P>>,

Source§

type Output = <i64 as Rem<Decimal<P>>>::Output

The resulting type after applying the % operator.
Source§

fn rem(self, other: &Decimal<P>) -> Self::Output

Performs the % operation. Read more
Source§

impl<const P: u8> Rem<&Decimal<P>> for i8
where PrecLimitCheck<{ _ }>: True, i8: Rem<Decimal<P>>,

Source§

type Output = <i8 as Rem<Decimal<P>>>::Output

The resulting type after applying the % operator.
Source§

fn rem(self, other: &Decimal<P>) -> Self::Output

Performs the % operation. Read more
Source§

impl<const P: u8> Rem<&Decimal<P>> for u16
where PrecLimitCheck<{ _ }>: True, u16: Rem<Decimal<P>>,

Source§

type Output = <u16 as Rem<Decimal<P>>>::Output

The resulting type after applying the % operator.
Source§

fn rem(self, other: &Decimal<P>) -> Self::Output

Performs the % operation. Read more
Source§

impl<const P: u8> Rem<&Decimal<P>> for u32
where PrecLimitCheck<{ _ }>: True, u32: Rem<Decimal<P>>,

Source§

type Output = <u32 as Rem<Decimal<P>>>::Output

The resulting type after applying the % operator.
Source§

fn rem(self, other: &Decimal<P>) -> Self::Output

Performs the % operation. Read more
Source§

impl<const P: u8> Rem<&Decimal<P>> for u64
where PrecLimitCheck<{ _ }>: True, u64: Rem<Decimal<P>>,

Source§

type Output = <u64 as Rem<Decimal<P>>>::Output

The resulting type after applying the % operator.
Source§

fn rem(self, other: &Decimal<P>) -> Self::Output

Performs the % operation. Read more
Source§

impl<const P: u8> Rem<&Decimal<P>> for u8
where PrecLimitCheck<{ _ }>: True, u8: Rem<Decimal<P>>,

Source§

type Output = <u8 as Rem<Decimal<P>>>::Output

The resulting type after applying the % operator.
Source§

fn rem(self, other: &Decimal<P>) -> Self::Output

Performs the % operation. Read more
Source§

impl<const P: u8, const Q: u8> Rem<&Decimal<Q>> for &Decimal<P>
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, Decimal<P>: Rem<Decimal<Q>>,

Source§

type Output = <Decimal<P> as Rem<Decimal<Q>>>::Output

The resulting type after applying the % operator.
Source§

fn rem(self, other: &Decimal<Q>) -> Self::Output

Performs the % operation. Read more
Source§

impl<const P: u8, const Q: u8> Rem<&Decimal<Q>> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, Decimal<P>: Rem<Decimal<Q>>,

Source§

type Output = <Decimal<P> as Rem<Decimal<Q>>>::Output

The resulting type after applying the % operator.
Source§

fn rem(self, other: &Decimal<Q>) -> Self::Output

Performs the % operation. Read more
Source§

impl<const P: u8> Rem<&i128> for &Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Rem<i128>,

Source§

type Output = <Decimal<P> as Rem<i128>>::Output

The resulting type after applying the % operator.
Source§

fn rem(self, other: &i128) -> Self::Output

Performs the % operation. Read more
Source§

impl<const P: u8> Rem<&i128> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Rem<i128>,

Source§

type Output = <Decimal<P> as Rem<i128>>::Output

The resulting type after applying the % operator.
Source§

fn rem(self, other: &i128) -> Self::Output

Performs the % operation. Read more
Source§

impl<const P: u8> Rem<&i16> for &Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Rem<i16>,

Source§

type Output = <Decimal<P> as Rem<i16>>::Output

The resulting type after applying the % operator.
Source§

fn rem(self, other: &i16) -> Self::Output

Performs the % operation. Read more
Source§

impl<const P: u8> Rem<&i16> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Rem<i16>,

Source§

type Output = <Decimal<P> as Rem<i16>>::Output

The resulting type after applying the % operator.
Source§

fn rem(self, other: &i16) -> Self::Output

Performs the % operation. Read more
Source§

impl<const P: u8> Rem<&i32> for &Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Rem<i32>,

Source§

type Output = <Decimal<P> as Rem<i32>>::Output

The resulting type after applying the % operator.
Source§

fn rem(self, other: &i32) -> Self::Output

Performs the % operation. Read more
Source§

impl<const P: u8> Rem<&i32> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Rem<i32>,

Source§

type Output = <Decimal<P> as Rem<i32>>::Output

The resulting type after applying the % operator.
Source§

fn rem(self, other: &i32) -> Self::Output

Performs the % operation. Read more
Source§

impl<const P: u8> Rem<&i64> for &Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Rem<i64>,

Source§

type Output = <Decimal<P> as Rem<i64>>::Output

The resulting type after applying the % operator.
Source§

fn rem(self, other: &i64) -> Self::Output

Performs the % operation. Read more
Source§

impl<const P: u8> Rem<&i64> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Rem<i64>,

Source§

type Output = <Decimal<P> as Rem<i64>>::Output

The resulting type after applying the % operator.
Source§

fn rem(self, other: &i64) -> Self::Output

Performs the % operation. Read more
Source§

impl<const P: u8> Rem<&i8> for &Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Rem<i8>,

Source§

type Output = <Decimal<P> as Rem<i8>>::Output

The resulting type after applying the % operator.
Source§

fn rem(self, other: &i8) -> Self::Output

Performs the % operation. Read more
Source§

impl<const P: u8> Rem<&i8> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Rem<i8>,

Source§

type Output = <Decimal<P> as Rem<i8>>::Output

The resulting type after applying the % operator.
Source§

fn rem(self, other: &i8) -> Self::Output

Performs the % operation. Read more
Source§

impl<const P: u8> Rem<&u16> for &Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Rem<u16>,

Source§

type Output = <Decimal<P> as Rem<u16>>::Output

The resulting type after applying the % operator.
Source§

fn rem(self, other: &u16) -> Self::Output

Performs the % operation. Read more
Source§

impl<const P: u8> Rem<&u16> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Rem<u16>,

Source§

type Output = <Decimal<P> as Rem<u16>>::Output

The resulting type after applying the % operator.
Source§

fn rem(self, other: &u16) -> Self::Output

Performs the % operation. Read more
Source§

impl<const P: u8> Rem<&u32> for &Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Rem<u32>,

Source§

type Output = <Decimal<P> as Rem<u32>>::Output

The resulting type after applying the % operator.
Source§

fn rem(self, other: &u32) -> Self::Output

Performs the % operation. Read more
Source§

impl<const P: u8> Rem<&u32> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Rem<u32>,

Source§

type Output = <Decimal<P> as Rem<u32>>::Output

The resulting type after applying the % operator.
Source§

fn rem(self, other: &u32) -> Self::Output

Performs the % operation. Read more
Source§

impl<const P: u8> Rem<&u64> for &Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Rem<u64>,

Source§

type Output = <Decimal<P> as Rem<u64>>::Output

The resulting type after applying the % operator.
Source§

fn rem(self, other: &u64) -> Self::Output

Performs the % operation. Read more
Source§

impl<const P: u8> Rem<&u64> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Rem<u64>,

Source§

type Output = <Decimal<P> as Rem<u64>>::Output

The resulting type after applying the % operator.
Source§

fn rem(self, other: &u64) -> Self::Output

Performs the % operation. Read more
Source§

impl<const P: u8> Rem<&u8> for &Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Rem<u8>,

Source§

type Output = <Decimal<P> as Rem<u8>>::Output

The resulting type after applying the % operator.
Source§

fn rem(self, other: &u8) -> Self::Output

Performs the % operation. Read more
Source§

impl<const P: u8> Rem<&u8> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Rem<u8>,

Source§

type Output = <Decimal<P> as Rem<u8>>::Output

The resulting type after applying the % operator.
Source§

fn rem(self, other: &u8) -> Self::Output

Performs the % operation. Read more
Source§

impl<'a, const P: u8> Rem<Decimal<P>> for &'a i128
where PrecLimitCheck<{ _ }>: True, i128: Rem<Decimal<P>>,

Source§

type Output = <i128 as Rem<Decimal<P>>>::Output

The resulting type after applying the % operator.
Source§

fn rem(self, other: Decimal<P>) -> Self::Output

Performs the % operation. Read more
Source§

impl<'a, const P: u8> Rem<Decimal<P>> for &'a i16
where PrecLimitCheck<{ _ }>: True, i16: Rem<Decimal<P>>,

Source§

type Output = <i16 as Rem<Decimal<P>>>::Output

The resulting type after applying the % operator.
Source§

fn rem(self, other: Decimal<P>) -> Self::Output

Performs the % operation. Read more
Source§

impl<'a, const P: u8> Rem<Decimal<P>> for &'a i32
where PrecLimitCheck<{ _ }>: True, i32: Rem<Decimal<P>>,

Source§

type Output = <i32 as Rem<Decimal<P>>>::Output

The resulting type after applying the % operator.
Source§

fn rem(self, other: Decimal<P>) -> Self::Output

Performs the % operation. Read more
Source§

impl<'a, const P: u8> Rem<Decimal<P>> for &'a i64
where PrecLimitCheck<{ _ }>: True, i64: Rem<Decimal<P>>,

Source§

type Output = <i64 as Rem<Decimal<P>>>::Output

The resulting type after applying the % operator.
Source§

fn rem(self, other: Decimal<P>) -> Self::Output

Performs the % operation. Read more
Source§

impl<'a, const P: u8> Rem<Decimal<P>> for &'a i8
where PrecLimitCheck<{ _ }>: True, i8: Rem<Decimal<P>>,

Source§

type Output = <i8 as Rem<Decimal<P>>>::Output

The resulting type after applying the % operator.
Source§

fn rem(self, other: Decimal<P>) -> Self::Output

Performs the % operation. Read more
Source§

impl<'a, const P: u8> Rem<Decimal<P>> for &'a u16
where PrecLimitCheck<{ _ }>: True, u16: Rem<Decimal<P>>,

Source§

type Output = <u16 as Rem<Decimal<P>>>::Output

The resulting type after applying the % operator.
Source§

fn rem(self, other: Decimal<P>) -> Self::Output

Performs the % operation. Read more
Source§

impl<'a, const P: u8> Rem<Decimal<P>> for &'a u32
where PrecLimitCheck<{ _ }>: True, u32: Rem<Decimal<P>>,

Source§

type Output = <u32 as Rem<Decimal<P>>>::Output

The resulting type after applying the % operator.
Source§

fn rem(self, other: Decimal<P>) -> Self::Output

Performs the % operation. Read more
Source§

impl<'a, const P: u8> Rem<Decimal<P>> for &'a u64
where PrecLimitCheck<{ _ }>: True, u64: Rem<Decimal<P>>,

Source§

type Output = <u64 as Rem<Decimal<P>>>::Output

The resulting type after applying the % operator.
Source§

fn rem(self, other: Decimal<P>) -> Self::Output

Performs the % operation. Read more
Source§

impl<'a, const P: u8> Rem<Decimal<P>> for &'a u8
where PrecLimitCheck<{ _ }>: True, u8: Rem<Decimal<P>>,

Source§

type Output = <u8 as Rem<Decimal<P>>>::Output

The resulting type after applying the % operator.
Source§

fn rem(self, other: Decimal<P>) -> Self::Output

Performs the % operation. Read more
Source§

impl<const P: u8> Rem<Decimal<P>> for i128
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<P>

The resulting type after applying the % operator.
Source§

fn rem(self, other: Decimal<P>) -> Self::Output

Performs the % operation. Read more
Source§

impl<const P: u8> Rem<Decimal<P>> for i16
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<P>

The resulting type after applying the % operator.
Source§

fn rem(self, other: Decimal<P>) -> Self::Output

Performs the % operation. Read more
Source§

impl<const P: u8> Rem<Decimal<P>> for i32
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<P>

The resulting type after applying the % operator.
Source§

fn rem(self, other: Decimal<P>) -> Self::Output

Performs the % operation. Read more
Source§

impl<const P: u8> Rem<Decimal<P>> for i64
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<P>

The resulting type after applying the % operator.
Source§

fn rem(self, other: Decimal<P>) -> Self::Output

Performs the % operation. Read more
Source§

impl<const P: u8> Rem<Decimal<P>> for i8
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<P>

The resulting type after applying the % operator.
Source§

fn rem(self, other: Decimal<P>) -> Self::Output

Performs the % operation. Read more
Source§

impl<const P: u8> Rem<Decimal<P>> for u16
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<P>

The resulting type after applying the % operator.
Source§

fn rem(self, other: Decimal<P>) -> Self::Output

Performs the % operation. Read more
Source§

impl<const P: u8> Rem<Decimal<P>> for u32
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<P>

The resulting type after applying the % operator.
Source§

fn rem(self, other: Decimal<P>) -> Self::Output

Performs the % operation. Read more
Source§

impl<const P: u8> Rem<Decimal<P>> for u64
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<P>

The resulting type after applying the % operator.
Source§

fn rem(self, other: Decimal<P>) -> Self::Output

Performs the % operation. Read more
Source§

impl<const P: u8> Rem<Decimal<P>> for u8
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<P>

The resulting type after applying the % operator.
Source§

fn rem(self, other: Decimal<P>) -> Self::Output

Performs the % operation. Read more
Source§

impl<'a, const P: u8, const Q: u8> Rem<Decimal<Q>> for &'a Decimal<P>
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, Decimal<P>: Rem<Decimal<Q>>,

Source§

type Output = <Decimal<P> as Rem<Decimal<Q>>>::Output

The resulting type after applying the % operator.
Source§

fn rem(self, other: Decimal<Q>) -> Self::Output

Performs the % operation. Read more
Source§

impl<const P: u8, const Q: u8> Rem<Decimal<Q>> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True,

Source§

type Output = <Decimal<P> as Sub<Decimal<Q>>>::Output

The resulting type after applying the % operator.
Source§

fn rem(self, other: Decimal<Q>) -> Self::Output

Performs the % operation. Read more
Source§

impl<'a, const P: u8> Rem<i128> for &'a Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Rem<i128>,

Source§

type Output = <Decimal<P> as Rem<i128>>::Output

The resulting type after applying the % operator.
Source§

fn rem(self, other: i128) -> Self::Output

Performs the % operation. Read more
Source§

impl<const P: u8> Rem<i128> for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<P>

The resulting type after applying the % operator.
Source§

fn rem(self, other: i128) -> Self::Output

Performs the % operation. Read more
Source§

impl<'a, const P: u8> Rem<i16> for &'a Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Rem<i16>,

Source§

type Output = <Decimal<P> as Rem<i16>>::Output

The resulting type after applying the % operator.
Source§

fn rem(self, other: i16) -> Self::Output

Performs the % operation. Read more
Source§

impl<const P: u8> Rem<i16> for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<P>

The resulting type after applying the % operator.
Source§

fn rem(self, other: i16) -> Self::Output

Performs the % operation. Read more
Source§

impl<'a, const P: u8> Rem<i32> for &'a Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Rem<i32>,

Source§

type Output = <Decimal<P> as Rem<i32>>::Output

The resulting type after applying the % operator.
Source§

fn rem(self, other: i32) -> Self::Output

Performs the % operation. Read more
Source§

impl<const P: u8> Rem<i32> for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<P>

The resulting type after applying the % operator.
Source§

fn rem(self, other: i32) -> Self::Output

Performs the % operation. Read more
Source§

impl<'a, const P: u8> Rem<i64> for &'a Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Rem<i64>,

Source§

type Output = <Decimal<P> as Rem<i64>>::Output

The resulting type after applying the % operator.
Source§

fn rem(self, other: i64) -> Self::Output

Performs the % operation. Read more
Source§

impl<const P: u8> Rem<i64> for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<P>

The resulting type after applying the % operator.
Source§

fn rem(self, other: i64) -> Self::Output

Performs the % operation. Read more
Source§

impl<'a, const P: u8> Rem<i8> for &'a Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Rem<i8>,

Source§

type Output = <Decimal<P> as Rem<i8>>::Output

The resulting type after applying the % operator.
Source§

fn rem(self, other: i8) -> Self::Output

Performs the % operation. Read more
Source§

impl<const P: u8> Rem<i8> for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<P>

The resulting type after applying the % operator.
Source§

fn rem(self, other: i8) -> Self::Output

Performs the % operation. Read more
Source§

impl<'a, const P: u8> Rem<u16> for &'a Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Rem<u16>,

Source§

type Output = <Decimal<P> as Rem<u16>>::Output

The resulting type after applying the % operator.
Source§

fn rem(self, other: u16) -> Self::Output

Performs the % operation. Read more
Source§

impl<const P: u8> Rem<u16> for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<P>

The resulting type after applying the % operator.
Source§

fn rem(self, other: u16) -> Self::Output

Performs the % operation. Read more
Source§

impl<'a, const P: u8> Rem<u32> for &'a Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Rem<u32>,

Source§

type Output = <Decimal<P> as Rem<u32>>::Output

The resulting type after applying the % operator.
Source§

fn rem(self, other: u32) -> Self::Output

Performs the % operation. Read more
Source§

impl<const P: u8> Rem<u32> for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<P>

The resulting type after applying the % operator.
Source§

fn rem(self, other: u32) -> Self::Output

Performs the % operation. Read more
Source§

impl<'a, const P: u8> Rem<u64> for &'a Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Rem<u64>,

Source§

type Output = <Decimal<P> as Rem<u64>>::Output

The resulting type after applying the % operator.
Source§

fn rem(self, other: u64) -> Self::Output

Performs the % operation. Read more
Source§

impl<const P: u8> Rem<u64> for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<P>

The resulting type after applying the % operator.
Source§

fn rem(self, other: u64) -> Self::Output

Performs the % operation. Read more
Source§

impl<'a, const P: u8> Rem<u8> for &'a Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Rem<u8>,

Source§

type Output = <Decimal<P> as Rem<u8>>::Output

The resulting type after applying the % operator.
Source§

fn rem(self, other: u8) -> Self::Output

Performs the % operation. Read more
Source§

impl<const P: u8> Rem<u8> for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<P>

The resulting type after applying the % operator.
Source§

fn rem(self, other: u8) -> Self::Output

Performs the % operation. Read more
Source§

impl<const P: u8, T> RemAssign<T> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Rem<T, Output = Self>,

Source§

fn rem_assign(&mut self, other: T)

Performs the %= operation. Read more
Source§

impl<const P: u8> Round for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

fn round(self, n_frac_digits: i8) -> Self

Returns a new Decimal<P> with its value rounded to n_frac_digits fractional digits according to the current RoundingMode.

§Panics

Panics if the resulting value can not be represented by Decimal<P>!

§Examples
let d = Dec!(28.27093);
let r = d.round(4);
assert_eq!(r.to_string(), "28.27090");
let r = d.round(1);
assert_eq!(r.to_string(), "28.30000");
let r = d.round(0);
assert_eq!(r.to_string(), "28.00000");
let r = d.round(-1);
assert_eq!(r.to_string(), "30.00000");
Source§

fn checked_round(self, n_frac_digits: i8) -> Option<Self>

Returns a new Decimal<P> instance with its value rounded to n_frac_digits fractional digits according to the current RoundingMode, wrapped in Option::Some, or Option::None if the result can not be represented by Decimal<P>.

§Examples
let d = Dec!(28.27093);
let r = d.checked_round(4)?;
assert_eq!(r.to_string(), "28.27090");
let r = d.checked_round(0)?;
assert_eq!(r.to_string(), "28.00000");
let d = Decimal::<3>::MAX;
let r = d.checked_round(0);
assert_eq!(r, None);
Source§

impl<const P: u8, const Q: u8> RoundInto<Decimal<Q>> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True,

Source§

fn round_into(self) -> Decimal<Q>

Returns a new Decimal<Q> instance with a value equivalent to self.round(Q).

§Panics

Panics if the result overflows Decimal::<Q>::MAX or Decimal::<Q>::MIN!

§Examples
let d = Dec!(378.60350);
let r: Decimal<3> = d.round_into();
assert_eq!(r.to_string(), "378.604");
let r: Decimal<1> = d.round_into();
assert_eq!(r.to_string(), "378.6");
Source§

impl<const P: u8> RoundInto<i128> for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

fn round_into(self) -> i128

Returns a new i128 instance with a value equivalent to self.round(0).

§Panics

Panics if the result overflows i128::MAX or i128::MIN!

§Examples
let d = Dec!(378.603);
let i: i128 = d.round_into();
assert_eq!(i, 379);
Source§

impl<const P: u8> Sub<&Decimal<P>> for &i128
where PrecLimitCheck<{ _ }>: True, i128: Sub<Decimal<P>>,

Source§

type Output = <i128 as Sub<Decimal<P>>>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, other: &Decimal<P>) -> Self::Output

Performs the - operation. Read more
Source§

impl<const P: u8> Sub<&Decimal<P>> for &i16
where PrecLimitCheck<{ _ }>: True, i16: Sub<Decimal<P>>,

Source§

type Output = <i16 as Sub<Decimal<P>>>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, other: &Decimal<P>) -> Self::Output

Performs the - operation. Read more
Source§

impl<const P: u8> Sub<&Decimal<P>> for &i32
where PrecLimitCheck<{ _ }>: True, i32: Sub<Decimal<P>>,

Source§

type Output = <i32 as Sub<Decimal<P>>>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, other: &Decimal<P>) -> Self::Output

Performs the - operation. Read more
Source§

impl<const P: u8> Sub<&Decimal<P>> for &i64
where PrecLimitCheck<{ _ }>: True, i64: Sub<Decimal<P>>,

Source§

type Output = <i64 as Sub<Decimal<P>>>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, other: &Decimal<P>) -> Self::Output

Performs the - operation. Read more
Source§

impl<const P: u8> Sub<&Decimal<P>> for &i8
where PrecLimitCheck<{ _ }>: True, i8: Sub<Decimal<P>>,

Source§

type Output = <i8 as Sub<Decimal<P>>>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, other: &Decimal<P>) -> Self::Output

Performs the - operation. Read more
Source§

impl<const P: u8> Sub<&Decimal<P>> for &u16
where PrecLimitCheck<{ _ }>: True, u16: Sub<Decimal<P>>,

Source§

type Output = <u16 as Sub<Decimal<P>>>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, other: &Decimal<P>) -> Self::Output

Performs the - operation. Read more
Source§

impl<const P: u8> Sub<&Decimal<P>> for &u32
where PrecLimitCheck<{ _ }>: True, u32: Sub<Decimal<P>>,

Source§

type Output = <u32 as Sub<Decimal<P>>>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, other: &Decimal<P>) -> Self::Output

Performs the - operation. Read more
Source§

impl<const P: u8> Sub<&Decimal<P>> for &u64
where PrecLimitCheck<{ _ }>: True, u64: Sub<Decimal<P>>,

Source§

type Output = <u64 as Sub<Decimal<P>>>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, other: &Decimal<P>) -> Self::Output

Performs the - operation. Read more
Source§

impl<const P: u8> Sub<&Decimal<P>> for &u8
where PrecLimitCheck<{ _ }>: True, u8: Sub<Decimal<P>>,

Source§

type Output = <u8 as Sub<Decimal<P>>>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, other: &Decimal<P>) -> Self::Output

Performs the - operation. Read more
Source§

impl<const P: u8> Sub<&Decimal<P>> for i128
where PrecLimitCheck<{ _ }>: True, i128: Sub<Decimal<P>>,

Source§

type Output = <i128 as Sub<Decimal<P>>>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, other: &Decimal<P>) -> Self::Output

Performs the - operation. Read more
Source§

impl<const P: u8> Sub<&Decimal<P>> for i16
where PrecLimitCheck<{ _ }>: True, i16: Sub<Decimal<P>>,

Source§

type Output = <i16 as Sub<Decimal<P>>>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, other: &Decimal<P>) -> Self::Output

Performs the - operation. Read more
Source§

impl<const P: u8> Sub<&Decimal<P>> for i32
where PrecLimitCheck<{ _ }>: True, i32: Sub<Decimal<P>>,

Source§

type Output = <i32 as Sub<Decimal<P>>>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, other: &Decimal<P>) -> Self::Output

Performs the - operation. Read more
Source§

impl<const P: u8> Sub<&Decimal<P>> for i64
where PrecLimitCheck<{ _ }>: True, i64: Sub<Decimal<P>>,

Source§

type Output = <i64 as Sub<Decimal<P>>>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, other: &Decimal<P>) -> Self::Output

Performs the - operation. Read more
Source§

impl<const P: u8> Sub<&Decimal<P>> for i8
where PrecLimitCheck<{ _ }>: True, i8: Sub<Decimal<P>>,

Source§

type Output = <i8 as Sub<Decimal<P>>>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, other: &Decimal<P>) -> Self::Output

Performs the - operation. Read more
Source§

impl<const P: u8> Sub<&Decimal<P>> for u16
where PrecLimitCheck<{ _ }>: True, u16: Sub<Decimal<P>>,

Source§

type Output = <u16 as Sub<Decimal<P>>>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, other: &Decimal<P>) -> Self::Output

Performs the - operation. Read more
Source§

impl<const P: u8> Sub<&Decimal<P>> for u32
where PrecLimitCheck<{ _ }>: True, u32: Sub<Decimal<P>>,

Source§

type Output = <u32 as Sub<Decimal<P>>>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, other: &Decimal<P>) -> Self::Output

Performs the - operation. Read more
Source§

impl<const P: u8> Sub<&Decimal<P>> for u64
where PrecLimitCheck<{ _ }>: True, u64: Sub<Decimal<P>>,

Source§

type Output = <u64 as Sub<Decimal<P>>>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, other: &Decimal<P>) -> Self::Output

Performs the - operation. Read more
Source§

impl<const P: u8> Sub<&Decimal<P>> for u8
where PrecLimitCheck<{ _ }>: True, u8: Sub<Decimal<P>>,

Source§

type Output = <u8 as Sub<Decimal<P>>>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, other: &Decimal<P>) -> Self::Output

Performs the - operation. Read more
Source§

impl<const P: u8, const Q: u8> Sub<&Decimal<Q>> for &Decimal<P>
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, Decimal<P>: Sub<Decimal<Q>>,

Source§

type Output = <Decimal<P> as Sub<Decimal<Q>>>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, other: &Decimal<Q>) -> Self::Output

Performs the - operation. Read more
Source§

impl<const P: u8, const Q: u8> Sub<&Decimal<Q>> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, Decimal<P>: Sub<Decimal<Q>>,

Source§

type Output = <Decimal<P> as Sub<Decimal<Q>>>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, other: &Decimal<Q>) -> Self::Output

Performs the - operation. Read more
Source§

impl<const P: u8> Sub<&i128> for &Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Sub<i128>,

Source§

type Output = <Decimal<P> as Sub<i128>>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, other: &i128) -> Self::Output

Performs the - operation. Read more
Source§

impl<const P: u8> Sub<&i128> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Sub<i128>,

Source§

type Output = <Decimal<P> as Sub<i128>>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, other: &i128) -> Self::Output

Performs the - operation. Read more
Source§

impl<const P: u8> Sub<&i16> for &Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Sub<i16>,

Source§

type Output = <Decimal<P> as Sub<i16>>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, other: &i16) -> Self::Output

Performs the - operation. Read more
Source§

impl<const P: u8> Sub<&i16> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Sub<i16>,

Source§

type Output = <Decimal<P> as Sub<i16>>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, other: &i16) -> Self::Output

Performs the - operation. Read more
Source§

impl<const P: u8> Sub<&i32> for &Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Sub<i32>,

Source§

type Output = <Decimal<P> as Sub<i32>>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, other: &i32) -> Self::Output

Performs the - operation. Read more
Source§

impl<const P: u8> Sub<&i32> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Sub<i32>,

Source§

type Output = <Decimal<P> as Sub<i32>>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, other: &i32) -> Self::Output

Performs the - operation. Read more
Source§

impl<const P: u8> Sub<&i64> for &Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Sub<i64>,

Source§

type Output = <Decimal<P> as Sub<i64>>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, other: &i64) -> Self::Output

Performs the - operation. Read more
Source§

impl<const P: u8> Sub<&i64> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Sub<i64>,

Source§

type Output = <Decimal<P> as Sub<i64>>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, other: &i64) -> Self::Output

Performs the - operation. Read more
Source§

impl<const P: u8> Sub<&i8> for &Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Sub<i8>,

Source§

type Output = <Decimal<P> as Sub<i8>>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, other: &i8) -> Self::Output

Performs the - operation. Read more
Source§

impl<const P: u8> Sub<&i8> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Sub<i8>,

Source§

type Output = <Decimal<P> as Sub<i8>>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, other: &i8) -> Self::Output

Performs the - operation. Read more
Source§

impl<const P: u8> Sub<&u16> for &Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Sub<u16>,

Source§

type Output = <Decimal<P> as Sub<u16>>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, other: &u16) -> Self::Output

Performs the - operation. Read more
Source§

impl<const P: u8> Sub<&u16> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Sub<u16>,

Source§

type Output = <Decimal<P> as Sub<u16>>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, other: &u16) -> Self::Output

Performs the - operation. Read more
Source§

impl<const P: u8> Sub<&u32> for &Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Sub<u32>,

Source§

type Output = <Decimal<P> as Sub<u32>>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, other: &u32) -> Self::Output

Performs the - operation. Read more
Source§

impl<const P: u8> Sub<&u32> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Sub<u32>,

Source§

type Output = <Decimal<P> as Sub<u32>>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, other: &u32) -> Self::Output

Performs the - operation. Read more
Source§

impl<const P: u8> Sub<&u64> for &Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Sub<u64>,

Source§

type Output = <Decimal<P> as Sub<u64>>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, other: &u64) -> Self::Output

Performs the - operation. Read more
Source§

impl<const P: u8> Sub<&u64> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Sub<u64>,

Source§

type Output = <Decimal<P> as Sub<u64>>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, other: &u64) -> Self::Output

Performs the - operation. Read more
Source§

impl<const P: u8> Sub<&u8> for &Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Sub<u8>,

Source§

type Output = <Decimal<P> as Sub<u8>>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, other: &u8) -> Self::Output

Performs the - operation. Read more
Source§

impl<const P: u8> Sub<&u8> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Sub<u8>,

Source§

type Output = <Decimal<P> as Sub<u8>>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, other: &u8) -> Self::Output

Performs the - operation. Read more
Source§

impl<'a, const P: u8> Sub<Decimal<P>> for &'a i128
where PrecLimitCheck<{ _ }>: True, i128: Sub<Decimal<P>>,

Source§

type Output = <i128 as Sub<Decimal<P>>>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, other: Decimal<P>) -> Self::Output

Performs the - operation. Read more
Source§

impl<'a, const P: u8> Sub<Decimal<P>> for &'a i16
where PrecLimitCheck<{ _ }>: True, i16: Sub<Decimal<P>>,

Source§

type Output = <i16 as Sub<Decimal<P>>>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, other: Decimal<P>) -> Self::Output

Performs the - operation. Read more
Source§

impl<'a, const P: u8> Sub<Decimal<P>> for &'a i32
where PrecLimitCheck<{ _ }>: True, i32: Sub<Decimal<P>>,

Source§

type Output = <i32 as Sub<Decimal<P>>>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, other: Decimal<P>) -> Self::Output

Performs the - operation. Read more
Source§

impl<'a, const P: u8> Sub<Decimal<P>> for &'a i64
where PrecLimitCheck<{ _ }>: True, i64: Sub<Decimal<P>>,

Source§

type Output = <i64 as Sub<Decimal<P>>>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, other: Decimal<P>) -> Self::Output

Performs the - operation. Read more
Source§

impl<'a, const P: u8> Sub<Decimal<P>> for &'a i8
where PrecLimitCheck<{ _ }>: True, i8: Sub<Decimal<P>>,

Source§

type Output = <i8 as Sub<Decimal<P>>>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, other: Decimal<P>) -> Self::Output

Performs the - operation. Read more
Source§

impl<'a, const P: u8> Sub<Decimal<P>> for &'a u16
where PrecLimitCheck<{ _ }>: True, u16: Sub<Decimal<P>>,

Source§

type Output = <u16 as Sub<Decimal<P>>>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, other: Decimal<P>) -> Self::Output

Performs the - operation. Read more
Source§

impl<'a, const P: u8> Sub<Decimal<P>> for &'a u32
where PrecLimitCheck<{ _ }>: True, u32: Sub<Decimal<P>>,

Source§

type Output = <u32 as Sub<Decimal<P>>>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, other: Decimal<P>) -> Self::Output

Performs the - operation. Read more
Source§

impl<'a, const P: u8> Sub<Decimal<P>> for &'a u64
where PrecLimitCheck<{ _ }>: True, u64: Sub<Decimal<P>>,

Source§

type Output = <u64 as Sub<Decimal<P>>>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, other: Decimal<P>) -> Self::Output

Performs the - operation. Read more
Source§

impl<'a, const P: u8> Sub<Decimal<P>> for &'a u8
where PrecLimitCheck<{ _ }>: True, u8: Sub<Decimal<P>>,

Source§

type Output = <u8 as Sub<Decimal<P>>>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, other: Decimal<P>) -> Self::Output

Performs the - operation. Read more
Source§

impl<const P: u8> Sub<Decimal<P>> for i128
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<P>

The resulting type after applying the - operator.
Source§

fn sub(self, other: Decimal<P>) -> Self::Output

Performs the - operation. Read more
Source§

impl<const P: u8> Sub<Decimal<P>> for i16
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<P>

The resulting type after applying the - operator.
Source§

fn sub(self, other: Decimal<P>) -> Self::Output

Performs the - operation. Read more
Source§

impl<const P: u8> Sub<Decimal<P>> for i32
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<P>

The resulting type after applying the - operator.
Source§

fn sub(self, other: Decimal<P>) -> Self::Output

Performs the - operation. Read more
Source§

impl<const P: u8> Sub<Decimal<P>> for i64
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<P>

The resulting type after applying the - operator.
Source§

fn sub(self, other: Decimal<P>) -> Self::Output

Performs the - operation. Read more
Source§

impl<const P: u8> Sub<Decimal<P>> for i8
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<P>

The resulting type after applying the - operator.
Source§

fn sub(self, other: Decimal<P>) -> Self::Output

Performs the - operation. Read more
Source§

impl<const P: u8> Sub<Decimal<P>> for u16
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<P>

The resulting type after applying the - operator.
Source§

fn sub(self, other: Decimal<P>) -> Self::Output

Performs the - operation. Read more
Source§

impl<const P: u8> Sub<Decimal<P>> for u32
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<P>

The resulting type after applying the - operator.
Source§

fn sub(self, other: Decimal<P>) -> Self::Output

Performs the - operation. Read more
Source§

impl<const P: u8> Sub<Decimal<P>> for u64
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<P>

The resulting type after applying the - operator.
Source§

fn sub(self, other: Decimal<P>) -> Self::Output

Performs the - operation. Read more
Source§

impl<const P: u8> Sub<Decimal<P>> for u8
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<P>

The resulting type after applying the - operator.
Source§

fn sub(self, other: Decimal<P>) -> Self::Output

Performs the - operation. Read more
Source§

impl<'a, const P: u8, const Q: u8> Sub<Decimal<Q>> for &'a Decimal<P>
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, Decimal<P>: Sub<Decimal<Q>>,

Source§

type Output = <Decimal<P> as Sub<Decimal<Q>>>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, other: Decimal<Q>) -> Self::Output

Performs the - operation. Read more
Source§

impl<const P: u8, const Q: u8> Sub<Decimal<Q>> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True, PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<{ const_max_u8(P, Q) }>

The resulting type after applying the - operator.
Source§

fn sub(self, other: Decimal<Q>) -> Self::Output

Performs the - operation. Read more
Source§

impl<'a, const P: u8> Sub<i128> for &'a Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Sub<i128>,

Source§

type Output = <Decimal<P> as Sub<i128>>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, other: i128) -> Self::Output

Performs the - operation. Read more
Source§

impl<const P: u8> Sub<i128> for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<P>

The resulting type after applying the - operator.
Source§

fn sub(self, other: i128) -> Self::Output

Performs the - operation. Read more
Source§

impl<'a, const P: u8> Sub<i16> for &'a Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Sub<i16>,

Source§

type Output = <Decimal<P> as Sub<i16>>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, other: i16) -> Self::Output

Performs the - operation. Read more
Source§

impl<const P: u8> Sub<i16> for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<P>

The resulting type after applying the - operator.
Source§

fn sub(self, other: i16) -> Self::Output

Performs the - operation. Read more
Source§

impl<'a, const P: u8> Sub<i32> for &'a Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Sub<i32>,

Source§

type Output = <Decimal<P> as Sub<i32>>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, other: i32) -> Self::Output

Performs the - operation. Read more
Source§

impl<const P: u8> Sub<i32> for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<P>

The resulting type after applying the - operator.
Source§

fn sub(self, other: i32) -> Self::Output

Performs the - operation. Read more
Source§

impl<'a, const P: u8> Sub<i64> for &'a Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Sub<i64>,

Source§

type Output = <Decimal<P> as Sub<i64>>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, other: i64) -> Self::Output

Performs the - operation. Read more
Source§

impl<const P: u8> Sub<i64> for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<P>

The resulting type after applying the - operator.
Source§

fn sub(self, other: i64) -> Self::Output

Performs the - operation. Read more
Source§

impl<'a, const P: u8> Sub<i8> for &'a Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Sub<i8>,

Source§

type Output = <Decimal<P> as Sub<i8>>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, other: i8) -> Self::Output

Performs the - operation. Read more
Source§

impl<const P: u8> Sub<i8> for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<P>

The resulting type after applying the - operator.
Source§

fn sub(self, other: i8) -> Self::Output

Performs the - operation. Read more
Source§

impl<'a, const P: u8> Sub<u16> for &'a Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Sub<u16>,

Source§

type Output = <Decimal<P> as Sub<u16>>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, other: u16) -> Self::Output

Performs the - operation. Read more
Source§

impl<const P: u8> Sub<u16> for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<P>

The resulting type after applying the - operator.
Source§

fn sub(self, other: u16) -> Self::Output

Performs the - operation. Read more
Source§

impl<'a, const P: u8> Sub<u32> for &'a Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Sub<u32>,

Source§

type Output = <Decimal<P> as Sub<u32>>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, other: u32) -> Self::Output

Performs the - operation. Read more
Source§

impl<const P: u8> Sub<u32> for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<P>

The resulting type after applying the - operator.
Source§

fn sub(self, other: u32) -> Self::Output

Performs the - operation. Read more
Source§

impl<'a, const P: u8> Sub<u64> for &'a Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Sub<u64>,

Source§

type Output = <Decimal<P> as Sub<u64>>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, other: u64) -> Self::Output

Performs the - operation. Read more
Source§

impl<const P: u8> Sub<u64> for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<P>

The resulting type after applying the - operator.
Source§

fn sub(self, other: u64) -> Self::Output

Performs the - operation. Read more
Source§

impl<'a, const P: u8> Sub<u8> for &'a Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Sub<u8>,

Source§

type Output = <Decimal<P> as Sub<u8>>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, other: u8) -> Self::Output

Performs the - operation. Read more
Source§

impl<const P: u8> Sub<u8> for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

type Output = Decimal<P>

The resulting type after applying the - operator.
Source§

fn sub(self, other: u8) -> Self::Output

Performs the - operation. Read more
Source§

impl<const P: u8, T> SubAssign<T> for Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Sub<T, Output = Self>,

Source§

fn sub_assign(&mut self, other: T)

Performs the -= operation. Read more
Source§

impl<const P: u8> TryFrom<&str> for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

type Error = ParseDecimalError

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

fn try_from(lit: &str) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<const P: u8> TryFrom<f32> for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

type Error = DecimalError

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

fn try_from(f: f32) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<const P: u8> TryFrom<f64> for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

type Error = DecimalError

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

fn try_from(f: f64) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<const P: u8> TryFrom<i128> for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

type Error = DecimalError

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

fn try_from(i: i128) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<const P: u8> TryFrom<u128> for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

type Error = DecimalError

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

fn try_from(i: u128) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<const P: u8> Zero for Decimal<P>
where PrecLimitCheck<{ _ }>: True, Decimal<P>: Add<Output = Decimal<P>>,

Source§

fn zero() -> Self

Returns the additive identity element of Self, 0. Read more
Source§

fn is_zero(&self) -> bool

Returns true if self is equal to the additive identity.
Source§

fn set_zero(&mut self)

Sets self to the additive identity element of Self, 0.
Source§

impl<const P: u8> Copy for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Source§

impl<const P: u8> Eq for Decimal<P>
where PrecLimitCheck<{ _ }>: True,

Auto Trait Implementations§

§

impl<const P: u8> Freeze for Decimal<P>

§

impl<const P: u8> RefUnwindSafe for Decimal<P>

§

impl<const P: u8> Send for Decimal<P>

§

impl<const P: u8> Sync for Decimal<P>

§

impl<const P: u8> Unpin for Decimal<P>

§

impl<const P: u8> UnwindSafe for Decimal<P>

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.
Source§

impl<T, Rhs> NumAssignOps<Rhs> for T
where T: AddAssign<Rhs> + SubAssign<Rhs> + MulAssign<Rhs> + DivAssign<Rhs> + RemAssign<Rhs>,

Source§

impl<T, Rhs, Output> NumOps<Rhs, Output> for T
where T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>,

Source§

impl<T, Base> RefNum<Base> for T
where T: NumOps<Base, Base> + for<'r> NumOps<&'r Base, Base>,