Struct scrypto::prelude::Decimal

source ·
pub struct Decimal(pub I192);
Expand description

Decimal represents a 192 bit representation of a fixed-scale decimal number.

The finite set of values are of the form m / 10^18, where m is an integer such that -2^(192 - 1) <= m < 2^(192 - 1).

Fractional part: ~60 bits/18 digits Integer part : 132 bits /40 digits Max : 3138550867693340381917894711603833208051.177722232017256447 Min : -3138550867693340381917894711603833208051.177722232017256448

Unless otherwise specified, all operations will panic if underflow/overflow.

Tuple Fields§

§0: I192

Implementations§

source§

impl Decimal

source

pub const MIN: Decimal = _

The min value of Decimal.

source

pub const MAX: Decimal = _

The max value of Decimal.

source

pub const BITS: usize = 192usize

The bit length of number storing Decimal.

source

pub const SCALE: u32 = 18u32

The fixed scale used by Decimal.

source

pub const ZERO: Decimal = _

source

pub const ONE_HUNDREDTH: Decimal = _

source

pub const ONE_TENTH: Decimal = _

source

pub const ONE: Decimal = _

source

pub const TEN: Decimal = _

source

pub const ONE_HUNDRED: Decimal = _

source

pub const fn zero() -> Decimal

Returns Decimal of 0.

source

pub const fn one() -> Decimal

Returns Decimal of 1.

source

pub fn is_zero(&self) -> bool

Whether this decimal is zero.

source

pub fn is_positive(&self) -> bool

Whether this decimal is positive.

source

pub fn is_negative(&self) -> bool

Whether this decimal is negative.

source

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

Returns the absolute value.

source

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

Returns the largest integer that is equal to or less than this number.

source

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

Returns the smallest integer that is equal to or greater than this number.

source

pub fn checked_round<T>( &self, decimal_places: T, mode: RoundingMode ) -> Option<Decimal>
where T: Into<i32>,

Rounds this number to the specified decimal places.

§Panics
  • Panic if the number of decimal places is not within [0..SCALE]
source

pub fn checked_powi(&self, exp: i64) -> Option<Decimal>

Calculates power using exponentiation by squaring“.

source

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

Square root of a Decimal

source

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

Cubic root of a Decimal

source

pub fn checked_nth_root(&self, n: u32) -> Option<Decimal>

Nth root of a Decimal

source§

impl Decimal

source

pub fn to_vec(&self) -> Vec<u8>

Trait Implementations§

source§

impl Add<Decimal> for I192

§

type Output = Decimal

The resulting type after applying the + operator.
source§

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

Performs the + operation. Read more
source§

impl Add<Decimal> for I256

§

type Output = Decimal

The resulting type after applying the + operator.
source§

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

Performs the + operation. Read more
source§

impl Add<Decimal> for I320

§

type Output = Decimal

The resulting type after applying the + operator.
source§

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

Performs the + operation. Read more
source§

impl Add<Decimal> for I448

§

type Output = Decimal

The resulting type after applying the + operator.
source§

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

Performs the + operation. Read more
source§

impl Add<Decimal> for I512

§

type Output = Decimal

The resulting type after applying the + operator.
source§

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

Performs the + operation. Read more
source§

impl Add<Decimal> for PreciseDecimal

§

type Output = PreciseDecimal

The resulting type after applying the + operator.
source§

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

Performs the + operation. Read more
source§

impl Add<Decimal> for U192

§

type Output = Decimal

The resulting type after applying the + operator.
source§

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

Performs the + operation. Read more
source§

impl Add<Decimal> for U256

§

type Output = Decimal

The resulting type after applying the + operator.
source§

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

Performs the + operation. Read more
source§

impl Add<Decimal> for U320

§

type Output = Decimal

The resulting type after applying the + operator.
source§

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

Performs the + operation. Read more
source§

impl Add<Decimal> for U448

§

type Output = Decimal

The resulting type after applying the + operator.
source§

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

Performs the + operation. Read more
source§

impl Add<Decimal> for U512

§

type Output = Decimal

The resulting type after applying the + operator.
source§

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

Performs the + operation. Read more
source§

impl Add<Decimal> for i128

§

type Output = Decimal

The resulting type after applying the + operator.
source§

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

Performs the + operation. Read more
source§

impl Add<Decimal> for i16

§

type Output = Decimal

The resulting type after applying the + operator.
source§

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

Performs the + operation. Read more
source§

impl Add<Decimal> for i32

§

type Output = Decimal

The resulting type after applying the + operator.
source§

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

Performs the + operation. Read more
source§

impl Add<Decimal> for i64

§

type Output = Decimal

The resulting type after applying the + operator.
source§

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

Performs the + operation. Read more
source§

impl Add<Decimal> for i8

§

type Output = Decimal

The resulting type after applying the + operator.
source§

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

Performs the + operation. Read more
source§

impl Add<Decimal> for isize

§

type Output = Decimal

The resulting type after applying the + operator.
source§

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

Performs the + operation. Read more
source§

impl Add<Decimal> for u128

§

type Output = Decimal

The resulting type after applying the + operator.
source§

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

Performs the + operation. Read more
source§

impl Add<Decimal> for u16

§

type Output = Decimal

The resulting type after applying the + operator.
source§

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

Performs the + operation. Read more
source§

impl Add<Decimal> for u32

§

type Output = Decimal

The resulting type after applying the + operator.
source§

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

Performs the + operation. Read more
source§

impl Add<Decimal> for u64

§

type Output = Decimal

The resulting type after applying the + operator.
source§

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

Performs the + operation. Read more
source§

impl Add<Decimal> for u8

§

type Output = Decimal

The resulting type after applying the + operator.
source§

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

Performs the + operation. Read more
source§

impl Add<Decimal> for usize

§

type Output = Decimal

The resulting type after applying the + operator.
source§

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

Performs the + operation. Read more
source§

impl Add<I192> for Decimal

§

type Output = Decimal

The resulting type after applying the + operator.
source§

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

Performs the + operation. Read more
source§

impl Add<I256> for Decimal

§

type Output = Decimal

The resulting type after applying the + operator.
source§

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

Performs the + operation. Read more
source§

impl Add<I320> for Decimal

§

type Output = Decimal

The resulting type after applying the + operator.
source§

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

Performs the + operation. Read more
source§

impl Add<I448> for Decimal

§

type Output = Decimal

The resulting type after applying the + operator.
source§

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

Performs the + operation. Read more
source§

impl Add<I512> for Decimal

§

type Output = Decimal

The resulting type after applying the + operator.
source§

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

Performs the + operation. Read more
source§

impl Add<PreciseDecimal> for Decimal

§

type Output = PreciseDecimal

The resulting type after applying the + operator.
source§

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

Performs the + operation. Read more
source§

impl Add<U192> for Decimal

§

type Output = Decimal

The resulting type after applying the + operator.
source§

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

Performs the + operation. Read more
source§

impl Add<U256> for Decimal

§

type Output = Decimal

The resulting type after applying the + operator.
source§

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

Performs the + operation. Read more
source§

impl Add<U320> for Decimal

§

type Output = Decimal

The resulting type after applying the + operator.
source§

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

Performs the + operation. Read more
source§

impl Add<U448> for Decimal

§

type Output = Decimal

The resulting type after applying the + operator.
source§

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

Performs the + operation. Read more
source§

impl Add<U512> for Decimal

§

type Output = Decimal

The resulting type after applying the + operator.
source§

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

Performs the + operation. Read more
source§

impl Add<i128> for Decimal

§

type Output = Decimal

The resulting type after applying the + operator.
source§

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

Performs the + operation. Read more
source§

impl Add<i16> for Decimal

§

type Output = Decimal

The resulting type after applying the + operator.
source§

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

Performs the + operation. Read more
source§

impl Add<i32> for Decimal

§

type Output = Decimal

The resulting type after applying the + operator.
source§

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

Performs the + operation. Read more
source§

impl Add<i64> for Decimal

§

type Output = Decimal

The resulting type after applying the + operator.
source§

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

Performs the + operation. Read more
source§

impl Add<i8> for Decimal

§

type Output = Decimal

The resulting type after applying the + operator.
source§

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

Performs the + operation. Read more
source§

impl Add<isize> for Decimal

§

type Output = Decimal

The resulting type after applying the + operator.
source§

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

Performs the + operation. Read more
source§

impl Add<u128> for Decimal

§

type Output = Decimal

The resulting type after applying the + operator.
source§

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

Performs the + operation. Read more
source§

impl Add<u16> for Decimal

§

type Output = Decimal

The resulting type after applying the + operator.
source§

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

Performs the + operation. Read more
source§

impl Add<u32> for Decimal

§

type Output = Decimal

The resulting type after applying the + operator.
source§

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

Performs the + operation. Read more
source§

impl Add<u64> for Decimal

§

type Output = Decimal

The resulting type after applying the + operator.
source§

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

Performs the + operation. Read more
source§

impl Add<u8> for Decimal

§

type Output = Decimal

The resulting type after applying the + operator.
source§

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

Performs the + operation. Read more
source§

impl Add<usize> for Decimal

§

type Output = Decimal

The resulting type after applying the + operator.
source§

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

Performs the + operation. Read more
source§

impl Add for Decimal

§

type Output = Decimal

The resulting type after applying the + operator.
source§

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

Performs the + operation. Read more
source§

impl AddAssign<Decimal> for PreciseDecimal

source§

fn add_assign(&mut self, other: Decimal)

Performs the += operation. Read more
source§

impl AddAssign<I192> for Decimal

source§

fn add_assign(&mut self, other: I192)

Performs the += operation. Read more
source§

impl AddAssign<I256> for Decimal

source§

fn add_assign(&mut self, other: I256)

Performs the += operation. Read more
source§

impl AddAssign<I320> for Decimal

source§

fn add_assign(&mut self, other: I320)

Performs the += operation. Read more
source§

impl AddAssign<I448> for Decimal

source§

fn add_assign(&mut self, other: I448)

Performs the += operation. Read more
source§

impl AddAssign<I512> for Decimal

source§

fn add_assign(&mut self, other: I512)

Performs the += operation. Read more
source§

impl AddAssign<U192> for Decimal

source§

fn add_assign(&mut self, other: U192)

Performs the += operation. Read more
source§

impl AddAssign<U256> for Decimal

source§

fn add_assign(&mut self, other: U256)

Performs the += operation. Read more
source§

impl AddAssign<U320> for Decimal

source§

fn add_assign(&mut self, other: U320)

Performs the += operation. Read more
source§

impl AddAssign<U448> for Decimal

source§

fn add_assign(&mut self, other: U448)

Performs the += operation. Read more
source§

impl AddAssign<U512> for Decimal

source§

fn add_assign(&mut self, other: U512)

Performs the += operation. Read more
source§

impl AddAssign<i128> for Decimal

source§

fn add_assign(&mut self, other: i128)

Performs the += operation. Read more
source§

impl AddAssign<i16> for Decimal

source§

fn add_assign(&mut self, other: i16)

Performs the += operation. Read more
source§

impl AddAssign<i32> for Decimal

source§

fn add_assign(&mut self, other: i32)

Performs the += operation. Read more
source§

impl AddAssign<i64> for Decimal

source§

fn add_assign(&mut self, other: i64)

Performs the += operation. Read more
source§

impl AddAssign<i8> for Decimal

source§

fn add_assign(&mut self, other: i8)

Performs the += operation. Read more
source§

impl AddAssign<isize> for Decimal

source§

fn add_assign(&mut self, other: isize)

Performs the += operation. Read more
source§

impl AddAssign<u128> for Decimal

source§

fn add_assign(&mut self, other: u128)

Performs the += operation. Read more
source§

impl AddAssign<u16> for Decimal

source§

fn add_assign(&mut self, other: u16)

Performs the += operation. Read more
source§

impl AddAssign<u32> for Decimal

source§

fn add_assign(&mut self, other: u32)

Performs the += operation. Read more
source§

impl AddAssign<u64> for Decimal

source§

fn add_assign(&mut self, other: u64)

Performs the += operation. Read more
source§

impl AddAssign<u8> for Decimal

source§

fn add_assign(&mut self, other: u8)

Performs the += operation. Read more
source§

impl AddAssign<usize> for Decimal

source§

fn add_assign(&mut self, other: usize)

Performs the += operation. Read more
source§

impl AddAssign for Decimal

source§

fn add_assign(&mut self, other: Decimal)

Performs the += operation. Read more
source§

impl Categorize<ManifestCustomValueKind> for Decimal

source§

impl Categorize<ScryptoCustomValueKind> for Decimal

source§

impl CheckedAdd<Decimal> for I192

source§

impl CheckedAdd<Decimal> for I256

source§

impl CheckedAdd<Decimal> for I320

source§

impl CheckedAdd<Decimal> for I448

source§

impl CheckedAdd<Decimal> for I512

source§

impl CheckedAdd<Decimal> for PreciseDecimal

source§

impl CheckedAdd<Decimal> for U192

source§

impl CheckedAdd<Decimal> for U256

source§

impl CheckedAdd<Decimal> for U320

source§

impl CheckedAdd<Decimal> for U448

source§

impl CheckedAdd<Decimal> for U512

source§

impl CheckedAdd<I192> for Decimal

source§

impl CheckedAdd<I256> for Decimal

source§

impl CheckedAdd<I320> for Decimal

source§

impl CheckedAdd<I448> for Decimal

source§

impl CheckedAdd<I512> for Decimal

source§

impl CheckedAdd<PreciseDecimal> for Decimal

source§

impl CheckedAdd<U192> for Decimal

source§

impl CheckedAdd<U256> for Decimal

source§

impl CheckedAdd<U320> for Decimal

source§

impl CheckedAdd<U448> for Decimal

source§

impl CheckedAdd<U512> for Decimal

source§

impl CheckedAdd<i128> for Decimal

source§

impl CheckedAdd<i16> for Decimal

source§

impl CheckedAdd<i32> for Decimal

source§

impl CheckedAdd<i64> for Decimal

source§

impl CheckedAdd<i8> for Decimal

source§

impl CheckedAdd<isize> for Decimal

source§

impl CheckedAdd<u128> for Decimal

source§

impl CheckedAdd<u16> for Decimal

source§

impl CheckedAdd<u32> for Decimal

source§

impl CheckedAdd<u64> for Decimal

source§

impl CheckedAdd<u8> for Decimal

source§

impl CheckedAdd<usize> for Decimal

source§

impl CheckedAdd for Decimal

source§

impl CheckedDiv<Decimal> for I192

source§

impl CheckedDiv<Decimal> for I256

source§

impl CheckedDiv<Decimal> for I320

source§

impl CheckedDiv<Decimal> for I448

source§

impl CheckedDiv<Decimal> for I512

source§

impl CheckedDiv<Decimal> for PreciseDecimal

source§

impl CheckedDiv<Decimal> for U192

source§

impl CheckedDiv<Decimal> for U256

source§

impl CheckedDiv<Decimal> for U320

source§

impl CheckedDiv<Decimal> for U448

source§

impl CheckedDiv<Decimal> for U512

source§

impl CheckedDiv<I192> for Decimal

source§

impl CheckedDiv<I256> for Decimal

source§

impl CheckedDiv<I320> for Decimal

source§

impl CheckedDiv<I448> for Decimal

source§

impl CheckedDiv<I512> for Decimal

source§

impl CheckedDiv<PreciseDecimal> for Decimal

source§

impl CheckedDiv<U192> for Decimal

source§

impl CheckedDiv<U256> for Decimal

source§

impl CheckedDiv<U320> for Decimal

source§

impl CheckedDiv<U448> for Decimal

source§

impl CheckedDiv<U512> for Decimal

source§

impl CheckedDiv<i128> for Decimal

source§

impl CheckedDiv<i16> for Decimal

source§

impl CheckedDiv<i32> for Decimal

source§

impl CheckedDiv<i64> for Decimal

source§

impl CheckedDiv<i8> for Decimal

source§

impl CheckedDiv<isize> for Decimal

source§

impl CheckedDiv<u128> for Decimal

source§

impl CheckedDiv<u16> for Decimal

source§

impl CheckedDiv<u32> for Decimal

source§

impl CheckedDiv<u64> for Decimal

source§

impl CheckedDiv<u8> for Decimal

source§

impl CheckedDiv<usize> for Decimal

source§

impl CheckedDiv for Decimal

source§

impl CheckedMul<Decimal> for I192

source§

impl CheckedMul<Decimal> for I256

source§

impl CheckedMul<Decimal> for I320

source§

impl CheckedMul<Decimal> for I448

source§

impl CheckedMul<Decimal> for I512

source§

impl CheckedMul<Decimal> for PreciseDecimal

source§

impl CheckedMul<Decimal> for U192

source§

impl CheckedMul<Decimal> for U256

source§

impl CheckedMul<Decimal> for U320

source§

impl CheckedMul<Decimal> for U448

source§

impl CheckedMul<Decimal> for U512

source§

impl CheckedMul<I192> for Decimal

source§

impl CheckedMul<I256> for Decimal

source§

impl CheckedMul<I320> for Decimal

source§

impl CheckedMul<I448> for Decimal

source§

impl CheckedMul<I512> for Decimal

source§

impl CheckedMul<PreciseDecimal> for Decimal

source§

impl CheckedMul<U192> for Decimal

source§

impl CheckedMul<U256> for Decimal

source§

impl CheckedMul<U320> for Decimal

source§

impl CheckedMul<U448> for Decimal

source§

impl CheckedMul<U512> for Decimal

source§

impl CheckedMul<i128> for Decimal

source§

impl CheckedMul<i16> for Decimal

source§

impl CheckedMul<i32> for Decimal

source§

impl CheckedMul<i64> for Decimal

source§

impl CheckedMul<i8> for Decimal

source§

impl CheckedMul<isize> for Decimal

source§

impl CheckedMul<u128> for Decimal

source§

impl CheckedMul<u16> for Decimal

source§

impl CheckedMul<u32> for Decimal

source§

impl CheckedMul<u64> for Decimal

source§

impl CheckedMul<u8> for Decimal

source§

impl CheckedMul<usize> for Decimal

source§

impl CheckedMul for Decimal

source§

impl CheckedNeg for Decimal

source§

impl CheckedSub<Decimal> for I192

source§

impl CheckedSub<Decimal> for I256

source§

impl CheckedSub<Decimal> for I320

source§

impl CheckedSub<Decimal> for I448

source§

impl CheckedSub<Decimal> for I512

source§

impl CheckedSub<Decimal> for PreciseDecimal

source§

impl CheckedSub<Decimal> for U192

source§

impl CheckedSub<Decimal> for U256

source§

impl CheckedSub<Decimal> for U320

source§

impl CheckedSub<Decimal> for U448

source§

impl CheckedSub<Decimal> for U512

source§

impl CheckedSub<I192> for Decimal

source§

impl CheckedSub<I256> for Decimal

source§

impl CheckedSub<I320> for Decimal

source§

impl CheckedSub<I448> for Decimal

source§

impl CheckedSub<I512> for Decimal

source§

impl CheckedSub<PreciseDecimal> for Decimal

source§

impl CheckedSub<U192> for Decimal

source§

impl CheckedSub<U256> for Decimal

source§

impl CheckedSub<U320> for Decimal

source§

impl CheckedSub<U448> for Decimal

source§

impl CheckedSub<U512> for Decimal

source§

impl CheckedSub<i128> for Decimal

source§

impl CheckedSub<i16> for Decimal

source§

impl CheckedSub<i32> for Decimal

source§

impl CheckedSub<i64> for Decimal

source§

impl CheckedSub<i8> for Decimal

source§

impl CheckedSub<isize> for Decimal

source§

impl CheckedSub<u128> for Decimal

source§

impl CheckedSub<u16> for Decimal

source§

impl CheckedSub<u32> for Decimal

source§

impl CheckedSub<u64> for Decimal

source§

impl CheckedSub<u8> for Decimal

source§

impl CheckedSub<usize> for Decimal

source§

impl CheckedSub for Decimal

source§

impl CheckedTruncate<Decimal> for PreciseDecimal

source§

impl Clone for Decimal

source§

fn clone(&self) -> Decimal

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

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

Performs copy-assignment from source. Read more
source§

impl Debug for Decimal

source§

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

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

impl<D> Decode<ManifestCustomValueKind, D> for Decimal

source§

fn decode_body_with_value_kind( decoder: &mut D, value_kind: ValueKind<ManifestCustomValueKind> ) -> Result<Decimal, DecodeError>

Decodes the type from the decoder, which should match a preloaded value kind. Read more
source§

impl<D> Decode<ScryptoCustomValueKind, D> for Decimal

source§

fn decode_body_with_value_kind( decoder: &mut D, value_kind: ValueKind<ScryptoCustomValueKind> ) -> Result<Decimal, DecodeError>

Decodes the type from the decoder, which should match a preloaded value kind. Read more
source§

impl Default for Decimal

source§

fn default() -> Decimal

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

impl Describe<ScryptoCustomTypeKind> for Decimal

source§

const TYPE_ID: RustTypeId = _

The TYPE_ID should give a unique identifier for its SBOR schema type. An SBOR schema type capture details about the SBOR payload, how it should be interpreted, validated and displayed. Read more
source§

fn type_data() -> TypeData<ScryptoCustomTypeKind, RustTypeId>

Returns the local schema for the given type. Read more
source§

fn add_all_dependencies(aggregator: &mut TypeAggregator<C>)

For each type referenced in get_local_type_data, we need to ensure that the type and all of its own references get added to the aggregator. Read more
source§

impl Display for Decimal

source§

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

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

impl Div<Decimal> for I192

§

type Output = Decimal

The resulting type after applying the / operator.
source§

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

Performs the / operation. Read more
source§

impl Div<Decimal> for I256

§

type Output = Decimal

The resulting type after applying the / operator.
source§

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

Performs the / operation. Read more
source§

impl Div<Decimal> for I320

§

type Output = Decimal

The resulting type after applying the / operator.
source§

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

Performs the / operation. Read more
source§

impl Div<Decimal> for I448

§

type Output = Decimal

The resulting type after applying the / operator.
source§

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

Performs the / operation. Read more
source§

impl Div<Decimal> for I512

§

type Output = Decimal

The resulting type after applying the / operator.
source§

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

Performs the / operation. Read more
source§

impl Div<Decimal> for PreciseDecimal

§

type Output = PreciseDecimal

The resulting type after applying the / operator.
source§

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

Performs the / operation. Read more
source§

impl Div<Decimal> for U192

§

type Output = Decimal

The resulting type after applying the / operator.
source§

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

Performs the / operation. Read more
source§

impl Div<Decimal> for U256

§

type Output = Decimal

The resulting type after applying the / operator.
source§

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

Performs the / operation. Read more
source§

impl Div<Decimal> for U320

§

type Output = Decimal

The resulting type after applying the / operator.
source§

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

Performs the / operation. Read more
source§

impl Div<Decimal> for U448

§

type Output = Decimal

The resulting type after applying the / operator.
source§

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

Performs the / operation. Read more
source§

impl Div<Decimal> for U512

§

type Output = Decimal

The resulting type after applying the / operator.
source§

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

Performs the / operation. Read more
source§

impl Div<Decimal> for i128

§

type Output = Decimal

The resulting type after applying the / operator.
source§

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

Performs the / operation. Read more
source§

impl Div<Decimal> for i16

§

type Output = Decimal

The resulting type after applying the / operator.
source§

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

Performs the / operation. Read more
source§

impl Div<Decimal> for i32

§

type Output = Decimal

The resulting type after applying the / operator.
source§

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

Performs the / operation. Read more
source§

impl Div<Decimal> for i64

§

type Output = Decimal

The resulting type after applying the / operator.
source§

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

Performs the / operation. Read more
source§

impl Div<Decimal> for i8

§

type Output = Decimal

The resulting type after applying the / operator.
source§

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

Performs the / operation. Read more
source§

impl Div<Decimal> for isize

§

type Output = Decimal

The resulting type after applying the / operator.
source§

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

Performs the / operation. Read more
source§

impl Div<Decimal> for u128

§

type Output = Decimal

The resulting type after applying the / operator.
source§

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

Performs the / operation. Read more
source§

impl Div<Decimal> for u16

§

type Output = Decimal

The resulting type after applying the / operator.
source§

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

Performs the / operation. Read more
source§

impl Div<Decimal> for u32

§

type Output = Decimal

The resulting type after applying the / operator.
source§

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

Performs the / operation. Read more
source§

impl Div<Decimal> for u64

§

type Output = Decimal

The resulting type after applying the / operator.
source§

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

Performs the / operation. Read more
source§

impl Div<Decimal> for u8

§

type Output = Decimal

The resulting type after applying the / operator.
source§

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

Performs the / operation. Read more
source§

impl Div<Decimal> for usize

§

type Output = Decimal

The resulting type after applying the / operator.
source§

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

Performs the / operation. Read more
source§

impl Div<I192> for Decimal

§

type Output = Decimal

The resulting type after applying the / operator.
source§

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

Performs the / operation. Read more
source§

impl Div<I256> for Decimal

§

type Output = Decimal

The resulting type after applying the / operator.
source§

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

Performs the / operation. Read more
source§

impl Div<I320> for Decimal

§

type Output = Decimal

The resulting type after applying the / operator.
source§

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

Performs the / operation. Read more
source§

impl Div<I448> for Decimal

§

type Output = Decimal

The resulting type after applying the / operator.
source§

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

Performs the / operation. Read more
source§

impl Div<I512> for Decimal

§

type Output = Decimal

The resulting type after applying the / operator.
source§

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

Performs the / operation. Read more
source§

impl Div<PreciseDecimal> for Decimal

§

type Output = PreciseDecimal

The resulting type after applying the / operator.
source§

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

Performs the / operation. Read more
source§

impl Div<U192> for Decimal

§

type Output = Decimal

The resulting type after applying the / operator.
source§

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

Performs the / operation. Read more
source§

impl Div<U256> for Decimal

§

type Output = Decimal

The resulting type after applying the / operator.
source§

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

Performs the / operation. Read more
source§

impl Div<U320> for Decimal

§

type Output = Decimal

The resulting type after applying the / operator.
source§

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

Performs the / operation. Read more
source§

impl Div<U448> for Decimal

§

type Output = Decimal

The resulting type after applying the / operator.
source§

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

Performs the / operation. Read more
source§

impl Div<U512> for Decimal

§

type Output = Decimal

The resulting type after applying the / operator.
source§

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

Performs the / operation. Read more
source§

impl Div<i128> for Decimal

§

type Output = Decimal

The resulting type after applying the / operator.
source§

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

Performs the / operation. Read more
source§

impl Div<i16> for Decimal

§

type Output = Decimal

The resulting type after applying the / operator.
source§

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

Performs the / operation. Read more
source§

impl Div<i32> for Decimal

§

type Output = Decimal

The resulting type after applying the / operator.
source§

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

Performs the / operation. Read more
source§

impl Div<i64> for Decimal

§

type Output = Decimal

The resulting type after applying the / operator.
source§

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

Performs the / operation. Read more
source§

impl Div<i8> for Decimal

§

type Output = Decimal

The resulting type after applying the / operator.
source§

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

Performs the / operation. Read more
source§

impl Div<isize> for Decimal

§

type Output = Decimal

The resulting type after applying the / operator.
source§

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

Performs the / operation. Read more
source§

impl Div<u128> for Decimal

§

type Output = Decimal

The resulting type after applying the / operator.
source§

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

Performs the / operation. Read more
source§

impl Div<u16> for Decimal

§

type Output = Decimal

The resulting type after applying the / operator.
source§

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

Performs the / operation. Read more
source§

impl Div<u32> for Decimal

§

type Output = Decimal

The resulting type after applying the / operator.
source§

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

Performs the / operation. Read more
source§

impl Div<u64> for Decimal

§

type Output = Decimal

The resulting type after applying the / operator.
source§

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

Performs the / operation. Read more
source§

impl Div<u8> for Decimal

§

type Output = Decimal

The resulting type after applying the / operator.
source§

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

Performs the / operation. Read more
source§

impl Div<usize> for Decimal

§

type Output = Decimal

The resulting type after applying the / operator.
source§

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

Performs the / operation. Read more
source§

impl Div for Decimal

§

type Output = Decimal

The resulting type after applying the / operator.
source§

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

Performs the / operation. Read more
source§

impl DivAssign<Decimal> for PreciseDecimal

source§

fn div_assign(&mut self, other: Decimal)

Performs the /= operation. Read more
source§

impl DivAssign<I192> for Decimal

source§

fn div_assign(&mut self, other: I192)

Performs the /= operation. Read more
source§

impl DivAssign<I256> for Decimal

source§

fn div_assign(&mut self, other: I256)

Performs the /= operation. Read more
source§

impl DivAssign<I320> for Decimal

source§

fn div_assign(&mut self, other: I320)

Performs the /= operation. Read more
source§

impl DivAssign<I448> for Decimal

source§

fn div_assign(&mut self, other: I448)

Performs the /= operation. Read more
source§

impl DivAssign<I512> for Decimal

source§

fn div_assign(&mut self, other: I512)

Performs the /= operation. Read more
source§

impl DivAssign<U192> for Decimal

source§

fn div_assign(&mut self, other: U192)

Performs the /= operation. Read more
source§

impl DivAssign<U256> for Decimal

source§

fn div_assign(&mut self, other: U256)

Performs the /= operation. Read more
source§

impl DivAssign<U320> for Decimal

source§

fn div_assign(&mut self, other: U320)

Performs the /= operation. Read more
source§

impl DivAssign<U448> for Decimal

source§

fn div_assign(&mut self, other: U448)

Performs the /= operation. Read more
source§

impl DivAssign<U512> for Decimal

source§

fn div_assign(&mut self, other: U512)

Performs the /= operation. Read more
source§

impl DivAssign<i128> for Decimal

source§

fn div_assign(&mut self, other: i128)

Performs the /= operation. Read more
source§

impl DivAssign<i16> for Decimal

source§

fn div_assign(&mut self, other: i16)

Performs the /= operation. Read more
source§

impl DivAssign<i32> for Decimal

source§

fn div_assign(&mut self, other: i32)

Performs the /= operation. Read more
source§

impl DivAssign<i64> for Decimal

source§

fn div_assign(&mut self, other: i64)

Performs the /= operation. Read more
source§

impl DivAssign<i8> for Decimal

source§

fn div_assign(&mut self, other: i8)

Performs the /= operation. Read more
source§

impl DivAssign<isize> for Decimal

source§

fn div_assign(&mut self, other: isize)

Performs the /= operation. Read more
source§

impl DivAssign<u128> for Decimal

source§

fn div_assign(&mut self, other: u128)

Performs the /= operation. Read more
source§

impl DivAssign<u16> for Decimal

source§

fn div_assign(&mut self, other: u16)

Performs the /= operation. Read more
source§

impl DivAssign<u32> for Decimal

source§

fn div_assign(&mut self, other: u32)

Performs the /= operation. Read more
source§

impl DivAssign<u64> for Decimal

source§

fn div_assign(&mut self, other: u64)

Performs the /= operation. Read more
source§

impl DivAssign<u8> for Decimal

source§

fn div_assign(&mut self, other: u8)

Performs the /= operation. Read more
source§

impl DivAssign<usize> for Decimal

source§

fn div_assign(&mut self, other: usize)

Performs the /= operation. Read more
source§

impl DivAssign for Decimal

source§

fn div_assign(&mut self, other: Decimal)

Performs the /= operation. Read more
source§

impl<E> Encode<ManifestCustomValueKind, E> for Decimal

source§

fn encode_value_kind(&self, encoder: &mut E) -> Result<(), EncodeError>

Encodes the SBOR value’s kind to the encoder
source§

fn encode_body(&self, encoder: &mut E) -> Result<(), EncodeError>

Encodes the SBOR body of the type to the encoder. Read more
source§

impl<E> Encode<ScryptoCustomValueKind, E> for Decimal

source§

fn encode_value_kind(&self, encoder: &mut E) -> Result<(), EncodeError>

Encodes the SBOR value’s kind to the encoder
source§

fn encode_body(&self, encoder: &mut E) -> Result<(), EncodeError>

Encodes the SBOR body of the type to the encoder. Read more
source§

impl ForWithdrawal for Decimal

source§

fn for_withdrawal( &self, divisibility: u8, withdraw_strategy: WithdrawStrategy ) -> Option<Decimal>

source§

impl From<Decimal> for PreciseDecimal

source§

fn from(val: Decimal) -> PreciseDecimal

Converts to this type from the input type.
source§

impl From<bool> for Decimal

source§

fn from(val: bool) -> Decimal

Converts to this type from the input type.
source§

impl From<i128> for Decimal

source§

fn from(val: i128) -> Decimal

Converts to this type from the input type.
source§

impl From<i16> for Decimal

source§

fn from(val: i16) -> Decimal

Converts to this type from the input type.
source§

impl From<i32> for Decimal

source§

fn from(val: i32) -> Decimal

Converts to this type from the input type.
source§

impl From<i64> for Decimal

source§

fn from(val: i64) -> Decimal

Converts to this type from the input type.
source§

impl From<i8> for Decimal

source§

fn from(val: i8) -> Decimal

Converts to this type from the input type.
source§

impl From<isize> for Decimal

source§

fn from(val: isize) -> Decimal

Converts to this type from the input type.
source§

impl From<u128> for Decimal

source§

fn from(val: u128) -> Decimal

Converts to this type from the input type.
source§

impl From<u16> for Decimal

source§

fn from(val: u16) -> Decimal

Converts to this type from the input type.
source§

impl From<u32> for Decimal

source§

fn from(val: u32) -> Decimal

Converts to this type from the input type.
source§

impl From<u64> for Decimal

source§

fn from(val: u64) -> Decimal

Converts to this type from the input type.
source§

impl From<u8> for Decimal

source§

fn from(val: u8) -> Decimal

Converts to this type from the input type.
source§

impl From<usize> for Decimal

source§

fn from(val: usize) -> Decimal

Converts to this type from the input type.
source§

impl FromStr for Decimal

§

type Err = ParseDecimalError

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

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

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

impl Hash for Decimal

source§

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

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

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

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

impl MetadataVal for Decimal

source§

impl Mul<Decimal> for I192

§

type Output = Decimal

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl Mul<Decimal> for I256

§

type Output = Decimal

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl Mul<Decimal> for I320

§

type Output = Decimal

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl Mul<Decimal> for I448

§

type Output = Decimal

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl Mul<Decimal> for I512

§

type Output = Decimal

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl Mul<Decimal> for PreciseDecimal

§

type Output = PreciseDecimal

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl Mul<Decimal> for U192

§

type Output = Decimal

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl Mul<Decimal> for U256

§

type Output = Decimal

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl Mul<Decimal> for U320

§

type Output = Decimal

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl Mul<Decimal> for U448

§

type Output = Decimal

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl Mul<Decimal> for U512

§

type Output = Decimal

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl Mul<Decimal> for i128

§

type Output = Decimal

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl Mul<Decimal> for i16

§

type Output = Decimal

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl Mul<Decimal> for i32

§

type Output = Decimal

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl Mul<Decimal> for i64

§

type Output = Decimal

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl Mul<Decimal> for i8

§

type Output = Decimal

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl Mul<Decimal> for isize

§

type Output = Decimal

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl Mul<Decimal> for u128

§

type Output = Decimal

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl Mul<Decimal> for u16

§

type Output = Decimal

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl Mul<Decimal> for u32

§

type Output = Decimal

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl Mul<Decimal> for u64

§

type Output = Decimal

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl Mul<Decimal> for u8

§

type Output = Decimal

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl Mul<Decimal> for usize

§

type Output = Decimal

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl Mul<I192> for Decimal

§

type Output = Decimal

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl Mul<I256> for Decimal

§

type Output = Decimal

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl Mul<I320> for Decimal

§

type Output = Decimal

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl Mul<I448> for Decimal

§

type Output = Decimal

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl Mul<I512> for Decimal

§

type Output = Decimal

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl Mul<PreciseDecimal> for Decimal

§

type Output = PreciseDecimal

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl Mul<U192> for Decimal

§

type Output = Decimal

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl Mul<U256> for Decimal

§

type Output = Decimal

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl Mul<U320> for Decimal

§

type Output = Decimal

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl Mul<U448> for Decimal

§

type Output = Decimal

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl Mul<U512> for Decimal

§

type Output = Decimal

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl Mul<i128> for Decimal

§

type Output = Decimal

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl Mul<i16> for Decimal

§

type Output = Decimal

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl Mul<i32> for Decimal

§

type Output = Decimal

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl Mul<i64> for Decimal

§

type Output = Decimal

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl Mul<i8> for Decimal

§

type Output = Decimal

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl Mul<isize> for Decimal

§

type Output = Decimal

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl Mul<u128> for Decimal

§

type Output = Decimal

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl Mul<u16> for Decimal

§

type Output = Decimal

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl Mul<u32> for Decimal

§

type Output = Decimal

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl Mul<u64> for Decimal

§

type Output = Decimal

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl Mul<u8> for Decimal

§

type Output = Decimal

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl Mul<usize> for Decimal

§

type Output = Decimal

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl Mul for Decimal

§

type Output = Decimal

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl MulAssign<Decimal> for PreciseDecimal

source§

fn mul_assign(&mut self, other: Decimal)

Performs the *= operation. Read more
source§

impl MulAssign<I192> for Decimal

source§

fn mul_assign(&mut self, other: I192)

Performs the *= operation. Read more
source§

impl MulAssign<I256> for Decimal

source§

fn mul_assign(&mut self, other: I256)

Performs the *= operation. Read more
source§

impl MulAssign<I320> for Decimal

source§

fn mul_assign(&mut self, other: I320)

Performs the *= operation. Read more
source§

impl MulAssign<I448> for Decimal

source§

fn mul_assign(&mut self, other: I448)

Performs the *= operation. Read more
source§

impl MulAssign<I512> for Decimal

source§

fn mul_assign(&mut self, other: I512)

Performs the *= operation. Read more
source§

impl MulAssign<U192> for Decimal

source§

fn mul_assign(&mut self, other: U192)

Performs the *= operation. Read more
source§

impl MulAssign<U256> for Decimal

source§

fn mul_assign(&mut self, other: U256)

Performs the *= operation. Read more
source§

impl MulAssign<U320> for Decimal

source§

fn mul_assign(&mut self, other: U320)

Performs the *= operation. Read more
source§

impl MulAssign<U448> for Decimal

source§

fn mul_assign(&mut self, other: U448)

Performs the *= operation. Read more
source§

impl MulAssign<U512> for Decimal

source§

fn mul_assign(&mut self, other: U512)

Performs the *= operation. Read more
source§

impl MulAssign<i128> for Decimal

source§

fn mul_assign(&mut self, other: i128)

Performs the *= operation. Read more
source§

impl MulAssign<i16> for Decimal

source§

fn mul_assign(&mut self, other: i16)

Performs the *= operation. Read more
source§

impl MulAssign<i32> for Decimal

source§

fn mul_assign(&mut self, other: i32)

Performs the *= operation. Read more
source§

impl MulAssign<i64> for Decimal

source§

fn mul_assign(&mut self, other: i64)

Performs the *= operation. Read more
source§

impl MulAssign<i8> for Decimal

source§

fn mul_assign(&mut self, other: i8)

Performs the *= operation. Read more
source§

impl MulAssign<isize> for Decimal

source§

fn mul_assign(&mut self, other: isize)

Performs the *= operation. Read more
source§

impl MulAssign<u128> for Decimal

source§

fn mul_assign(&mut self, other: u128)

Performs the *= operation. Read more
source§

impl MulAssign<u16> for Decimal

source§

fn mul_assign(&mut self, other: u16)

Performs the *= operation. Read more
source§

impl MulAssign<u32> for Decimal

source§

fn mul_assign(&mut self, other: u32)

Performs the *= operation. Read more
source§

impl MulAssign<u64> for Decimal

source§

fn mul_assign(&mut self, other: u64)

Performs the *= operation. Read more
source§

impl MulAssign<u8> for Decimal

source§

fn mul_assign(&mut self, other: u8)

Performs the *= operation. Read more
source§

impl MulAssign<usize> for Decimal

source§

fn mul_assign(&mut self, other: usize)

Performs the *= operation. Read more
source§

impl MulAssign for Decimal

source§

fn mul_assign(&mut self, other: Decimal)

Performs the *= operation. Read more
source§

impl Neg for Decimal

§

type Output = Decimal

The resulting type after applying the - operator.
source§

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

Performs the unary - operation. Read more
source§

impl Ord for Decimal

source§

fn cmp(&self, other: &Decimal) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

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

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

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

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

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

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

impl PartialEq for Decimal

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for Decimal

source§

fn partial_cmp(&self, other: &Decimal) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

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

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

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

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

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

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl SingleMetadataVal for Decimal

source§

impl Sub<Decimal> for I192

§

type Output = Decimal

The resulting type after applying the - operator.
source§

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

Performs the - operation. Read more
source§

impl Sub<Decimal> for I256

§

type Output = Decimal

The resulting type after applying the - operator.
source§

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

Performs the - operation. Read more
source§

impl Sub<Decimal> for I320

§

type Output = Decimal

The resulting type after applying the - operator.
source§

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

Performs the - operation. Read more
source§

impl Sub<Decimal> for I448

§

type Output = Decimal

The resulting type after applying the - operator.
source§

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

Performs the - operation. Read more
source§

impl Sub<Decimal> for I512

§

type Output = Decimal

The resulting type after applying the - operator.
source§

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

Performs the - operation. Read more
source§

impl Sub<Decimal> for PreciseDecimal

§

type Output = PreciseDecimal

The resulting type after applying the - operator.
source§

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

Performs the - operation. Read more
source§

impl Sub<Decimal> for U192

§

type Output = Decimal

The resulting type after applying the - operator.
source§

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

Performs the - operation. Read more
source§

impl Sub<Decimal> for U256

§

type Output = Decimal

The resulting type after applying the - operator.
source§

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

Performs the - operation. Read more
source§

impl Sub<Decimal> for U320

§

type Output = Decimal

The resulting type after applying the - operator.
source§

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

Performs the - operation. Read more
source§

impl Sub<Decimal> for U448

§

type Output = Decimal

The resulting type after applying the - operator.
source§

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

Performs the - operation. Read more
source§

impl Sub<Decimal> for U512

§

type Output = Decimal

The resulting type after applying the - operator.
source§

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

Performs the - operation. Read more
source§

impl Sub<Decimal> for i128

§

type Output = Decimal

The resulting type after applying the - operator.
source§

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

Performs the - operation. Read more
source§

impl Sub<Decimal> for i16

§

type Output = Decimal

The resulting type after applying the - operator.
source§

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

Performs the - operation. Read more
source§

impl Sub<Decimal> for i32

§

type Output = Decimal

The resulting type after applying the - operator.
source§

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

Performs the - operation. Read more
source§

impl Sub<Decimal> for i64

§

type Output = Decimal

The resulting type after applying the - operator.
source§

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

Performs the - operation. Read more
source§

impl Sub<Decimal> for i8

§

type Output = Decimal

The resulting type after applying the - operator.
source§

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

Performs the - operation. Read more
source§

impl Sub<Decimal> for isize

§

type Output = Decimal

The resulting type after applying the - operator.
source§

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

Performs the - operation. Read more
source§

impl Sub<Decimal> for u128

§

type Output = Decimal

The resulting type after applying the - operator.
source§

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

Performs the - operation. Read more
source§

impl Sub<Decimal> for u16

§

type Output = Decimal

The resulting type after applying the - operator.
source§

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

Performs the - operation. Read more
source§

impl Sub<Decimal> for u32

§

type Output = Decimal

The resulting type after applying the - operator.
source§

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

Performs the - operation. Read more
source§

impl Sub<Decimal> for u64

§

type Output = Decimal

The resulting type after applying the - operator.
source§

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

Performs the - operation. Read more
source§

impl Sub<Decimal> for u8

§

type Output = Decimal

The resulting type after applying the - operator.
source§

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

Performs the - operation. Read more
source§

impl Sub<Decimal> for usize

§

type Output = Decimal

The resulting type after applying the - operator.
source§

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

Performs the - operation. Read more
source§

impl Sub<I192> for Decimal

§

type Output = Decimal

The resulting type after applying the - operator.
source§

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

Performs the - operation. Read more
source§

impl Sub<I256> for Decimal

§

type Output = Decimal

The resulting type after applying the - operator.
source§

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

Performs the - operation. Read more
source§

impl Sub<I320> for Decimal

§

type Output = Decimal

The resulting type after applying the - operator.
source§

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

Performs the - operation. Read more
source§

impl Sub<I448> for Decimal

§

type Output = Decimal

The resulting type after applying the - operator.
source§

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

Performs the - operation. Read more
source§

impl Sub<I512> for Decimal

§

type Output = Decimal

The resulting type after applying the - operator.
source§

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

Performs the - operation. Read more
source§

impl Sub<PreciseDecimal> for Decimal

§

type Output = PreciseDecimal

The resulting type after applying the - operator.
source§

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

Performs the - operation. Read more
source§

impl Sub<U192> for Decimal

§

type Output = Decimal

The resulting type after applying the - operator.
source§

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

Performs the - operation. Read more
source§

impl Sub<U256> for Decimal

§

type Output = Decimal

The resulting type after applying the - operator.
source§

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

Performs the - operation. Read more
source§

impl Sub<U320> for Decimal

§

type Output = Decimal

The resulting type after applying the - operator.
source§

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

Performs the - operation. Read more
source§

impl Sub<U448> for Decimal

§

type Output = Decimal

The resulting type after applying the - operator.
source§

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

Performs the - operation. Read more
source§

impl Sub<U512> for Decimal

§

type Output = Decimal

The resulting type after applying the - operator.
source§

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

Performs the - operation. Read more
source§

impl Sub<i128> for Decimal

§

type Output = Decimal

The resulting type after applying the - operator.
source§

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

Performs the - operation. Read more
source§

impl Sub<i16> for Decimal

§

type Output = Decimal

The resulting type after applying the - operator.
source§

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

Performs the - operation. Read more
source§

impl Sub<i32> for Decimal

§

type Output = Decimal

The resulting type after applying the - operator.
source§

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

Performs the - operation. Read more
source§

impl Sub<i64> for Decimal

§

type Output = Decimal

The resulting type after applying the - operator.
source§

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

Performs the - operation. Read more
source§

impl Sub<i8> for Decimal

§

type Output = Decimal

The resulting type after applying the - operator.
source§

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

Performs the - operation. Read more
source§

impl Sub<isize> for Decimal

§

type Output = Decimal

The resulting type after applying the - operator.
source§

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

Performs the - operation. Read more
source§

impl Sub<u128> for Decimal

§

type Output = Decimal

The resulting type after applying the - operator.
source§

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

Performs the - operation. Read more
source§

impl Sub<u16> for Decimal

§

type Output = Decimal

The resulting type after applying the - operator.
source§

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

Performs the - operation. Read more
source§

impl Sub<u32> for Decimal

§

type Output = Decimal

The resulting type after applying the - operator.
source§

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

Performs the - operation. Read more
source§

impl Sub<u64> for Decimal

§

type Output = Decimal

The resulting type after applying the - operator.
source§

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

Performs the - operation. Read more
source§

impl Sub<u8> for Decimal

§

type Output = Decimal

The resulting type after applying the - operator.
source§

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

Performs the - operation. Read more
source§

impl Sub<usize> for Decimal

§

type Output = Decimal

The resulting type after applying the - operator.
source§

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

Performs the - operation. Read more
source§

impl Sub for Decimal

§

type Output = Decimal

The resulting type after applying the - operator.
source§

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

Performs the - operation. Read more
source§

impl SubAssign<Decimal> for PreciseDecimal

source§

fn sub_assign(&mut self, other: Decimal)

Performs the -= operation. Read more
source§

impl SubAssign<I192> for Decimal

source§

fn sub_assign(&mut self, other: I192)

Performs the -= operation. Read more
source§

impl SubAssign<I256> for Decimal

source§

fn sub_assign(&mut self, other: I256)

Performs the -= operation. Read more
source§

impl SubAssign<I320> for Decimal

source§

fn sub_assign(&mut self, other: I320)

Performs the -= operation. Read more
source§

impl SubAssign<I448> for Decimal

source§

fn sub_assign(&mut self, other: I448)

Performs the -= operation. Read more
source§

impl SubAssign<I512> for Decimal

source§

fn sub_assign(&mut self, other: I512)

Performs the -= operation. Read more
source§

impl SubAssign<U192> for Decimal

source§

fn sub_assign(&mut self, other: U192)

Performs the -= operation. Read more
source§

impl SubAssign<U256> for Decimal

source§

fn sub_assign(&mut self, other: U256)

Performs the -= operation. Read more
source§

impl SubAssign<U320> for Decimal

source§

fn sub_assign(&mut self, other: U320)

Performs the -= operation. Read more
source§

impl SubAssign<U448> for Decimal

source§

fn sub_assign(&mut self, other: U448)

Performs the -= operation. Read more
source§

impl SubAssign<U512> for Decimal

source§

fn sub_assign(&mut self, other: U512)

Performs the -= operation. Read more
source§

impl SubAssign<i128> for Decimal

source§

fn sub_assign(&mut self, other: i128)

Performs the -= operation. Read more
source§

impl SubAssign<i16> for Decimal

source§

fn sub_assign(&mut self, other: i16)

Performs the -= operation. Read more
source§

impl SubAssign<i32> for Decimal

source§

fn sub_assign(&mut self, other: i32)

Performs the -= operation. Read more
source§

impl SubAssign<i64> for Decimal

source§

fn sub_assign(&mut self, other: i64)

Performs the -= operation. Read more
source§

impl SubAssign<i8> for Decimal

source§

fn sub_assign(&mut self, other: i8)

Performs the -= operation. Read more
source§

impl SubAssign<isize> for Decimal

source§

fn sub_assign(&mut self, other: isize)

Performs the -= operation. Read more
source§

impl SubAssign<u128> for Decimal

source§

fn sub_assign(&mut self, other: u128)

Performs the -= operation. Read more
source§

impl SubAssign<u16> for Decimal

source§

fn sub_assign(&mut self, other: u16)

Performs the -= operation. Read more
source§

impl SubAssign<u32> for Decimal

source§

fn sub_assign(&mut self, other: u32)

Performs the -= operation. Read more
source§

impl SubAssign<u64> for Decimal

source§

fn sub_assign(&mut self, other: u64)

Performs the -= operation. Read more
source§

impl SubAssign<u8> for Decimal

source§

fn sub_assign(&mut self, other: u8)

Performs the -= operation. Read more
source§

impl SubAssign<usize> for Decimal

source§

fn sub_assign(&mut self, other: usize)

Performs the -= operation. Read more
source§

impl SubAssign for Decimal