Skip to main content

Decimal

Struct Decimal 

Source
pub struct Decimal { /* private fields */ }
Expand description

An arbitrary-precision decimal, re-exported from bigdecimal::BigDecimal.

A Decimal deserializes from a decimal string or a JSON number, and serializes as a string so that clients keep its precision. Create one by parsing text rather than converting a float.

Laravel’s request decoding keeps the exact numeric text for ordinary Decimal fields. If you decode with Serde directly, or through untagged or flatten, which buffer the input, send decimals as strings so they never pass through a float.

use laravel::numeric::Decimal;

let amount: Decimal = "19.99".parse()?;
let fee: Decimal = "0.01".parse()?;

assert_eq!((amount + fee).to_string(), "20.00");

A big decimal type.

Implementations§

Source§

impl BigDecimal

Source

pub fn new(digits: BigInt, scale: i64) -> BigDecimal

Creates and initializes a BigDecimal.

The more explicit method from_bigint should be preferred, as new may change in the future.

Source

pub fn from_bigint(digits: BigInt, scale: i64) -> BigDecimal

Construct BigDecimal from BigInt and a scale

Source

pub fn from_biguint(digits: BigUint, scale: i64) -> BigDecimal

Construct positive BigDecimal from BigUint and a scale

Source

pub fn to_ref(&self) -> BigDecimalRef<'_>

Make a BigDecimalRef of this value

Source

pub fn decimal_digit_count(&self) -> u64

Count of decimal digits

Zero is considered to be one digit.

Source

pub fn order_of_magnitude(&self) -> i64

Position of most significant digit of this decimal

Equivalent to the exponent when written in scientific notation, or ⌊log10(n)⌋.

The order of magnitude of 0 is 0.

Source

pub fn fractional_digit_count(&self) -> i64

Returns the scale of the BigDecimal, the total number of digits to the right of the decimal point (including insignificant leading zeros)

§Examples
use bigdecimal::BigDecimal;
use std::str::FromStr;

let a = BigDecimal::from(12345);  // No fractional part
let b = BigDecimal::from_str("123.45").unwrap();  // Fractional part
let c = BigDecimal::from_str("0.0000012345").unwrap();  // Completely fractional part
let d = BigDecimal::from_str("5e9").unwrap();  // Negative-fractional part

assert_eq!(a.fractional_digit_count(), 0);
assert_eq!(b.fractional_digit_count(), 2);
assert_eq!(c.fractional_digit_count(), 10);
assert_eq!(d.fractional_digit_count(), -9);
Source

pub fn parse_bytes(buf: &[u8], radix: u32) -> Option<BigDecimal>

Creates and initializes a BigDecimal.

Decodes using str::from_utf8 and forwards to BigDecimal::from_str_radix. Only base-10 is supported.

§Examples
use bigdecimal::{BigDecimal, Zero};

assert_eq!(BigDecimal::parse_bytes(b"0", 10).unwrap(), BigDecimal::zero());
assert_eq!(BigDecimal::parse_bytes(b"13", 10).unwrap(), BigDecimal::from(13));
Source

pub fn with_scale(&self, new_scale: i64) -> BigDecimal

Return a new BigDecimal object equivalent to self, with internal scaling set to the number specified. If the new_scale is lower than the current value (indicating a larger power of 10), digits will be dropped (as precision is lower)

Source

pub fn with_scale_round(&self, new_scale: i64, mode: RoundingMode) -> BigDecimal

Return a new BigDecimal after shortening the digits and rounding


let n: BigDecimal = "129.41675".parse().unwrap();

assert_eq!(n.with_scale_round(2, RoundingMode::Up),  "129.42".parse::<BigDecimal>().unwrap());
assert_eq!(n.with_scale_round(-1, RoundingMode::Down),  "120".parse::<BigDecimal>().unwrap());
assert_eq!(n.with_scale_round(4, RoundingMode::HalfEven),  "129.4168".parse::<BigDecimal>().unwrap());
Source

pub fn with_prec(&self, prec: u64) -> BigDecimal

Return a new BigDecimal object with precision set to new value


let n: BigDecimal = "129.41675".parse().unwrap();

assert_eq!(n.with_prec(2),  "130".parse::<BigDecimal>().unwrap());

let n_p12 = n.with_prec(12);
let (i, scale) = n_p12.as_bigint_and_exponent();
assert_eq!(n_p12, "129.416750000".parse::<BigDecimal>().unwrap());
assert_eq!(i, 129416750000_u64.into());
assert_eq!(scale, 9);
Source

pub fn with_precision_round( &self, prec: NonZero<u64>, round: RoundingMode, ) -> BigDecimal

Return this BigDecimal with the given precision, rounding if needed

Source

pub fn sign(&self) -> Sign

Return the sign of the BigDecimal as num::bigint::Sign.


fn sign_of(src: &str) -> Sign {
   let n: BigDecimal = src.parse().unwrap();
   n.sign()
}

assert_eq!(sign_of("-1"), Sign::Minus);
assert_eq!(sign_of("0"),  Sign::NoSign);
assert_eq!(sign_of("1"),  Sign::Plus);
Source

pub fn as_bigint_and_exponent(&self) -> (BigInt, i64)

Return the internal big integer value and an exponent. Note that a positive exponent indicates a negative power of 10.

§Examples
use bigdecimal::{BigDecimal, num_bigint::BigInt};

let n: BigDecimal = "1.23456".parse().unwrap();
let expected = ("123456".parse::<BigInt>().unwrap(), 5);
assert_eq!(n.as_bigint_and_exponent(), expected);
Source

pub fn into_bigint_and_scale(self) -> (BigInt, i64)

Take BigDecimal and split into num::BigInt of digits, and the scale

Scale is number of digits after the decimal point, can be negative.

Source

pub fn as_bigint_and_scale(&self) -> (Cow<'_, BigInt>, i64)

Return digits as borrowed Cow of integer digits, and its scale

Scale is number of digits after the decimal point, can be negative.

Source

pub fn into_bigint_and_exponent(self) -> (BigInt, i64)

Convert into the internal big integer value and an exponent. Note that a positive exponent indicates a negative power of 10.

§Examples
use bigdecimal::{BigDecimal, num_bigint::BigInt};

let n: BigDecimal = "1.23456".parse().unwrap();
let expected = ("123456".parse::<num_bigint::BigInt>().unwrap(), 5);
assert_eq!(n.into_bigint_and_exponent(), expected);
Source

pub fn digits(&self) -> u64

Number of digits in the non-scaled integer representation

Source

pub fn abs(&self) -> BigDecimal

Compute the absolute value of number

let n: BigDecimal = "123.45".parse().unwrap();
assert_eq!(n.abs(), "123.45".parse::<BigDecimal>().unwrap());

let n: BigDecimal = "-123.45".parse().unwrap();
assert_eq!(n.abs(), "123.45".parse::<BigDecimal>().unwrap());
Source

pub fn double(&self) -> BigDecimal

Multiply decimal by 2 (efficiently)

let n: BigDecimal = "123.45".parse().unwrap();
assert_eq!(n.double(), "246.90".parse::<BigDecimal>().unwrap());
Source

pub fn half(&self) -> BigDecimal

Divide decimal by 2 (efficiently)

Note: If the last digit in the decimal is odd, the precision will increase by 1

let n: BigDecimal = "123.45".parse().unwrap();
assert_eq!(n.half(), "61.725".parse::<BigDecimal>().unwrap());
Source

pub fn square(&self) -> BigDecimal

Square a decimal: x²

No rounding or truncating of digits; this is the full result of the squaring operation.

Note: doubles the scale of bigdecimal, which might lead to accidental exponential-complexity if used in a loop.

let n: BigDecimal = "1.1156024145937225657484".parse().unwrap();
assert_eq!(n.square(), "1.24456874744734405154288399835406316085210256".parse::<BigDecimal>().unwrap());

let n: BigDecimal = "-9.238597585E+84".parse::<BigDecimal>().unwrap();
assert_eq!(n.square(), "8.5351685337567832225E+169".parse::<BigDecimal>().unwrap());
Source

pub fn cube(&self) -> BigDecimal

Cube a decimal: x³

No rounding or truncating of digits; this is the full result of the cubing operation.

Note: triples the scale of bigdecimal, which might lead to accidental exponential-complexity if used in a loop.

let n: BigDecimal = "1.1156024145937225657484".parse().unwrap();
assert_eq!(n.cube(), "1.388443899780141911774491376394890472130000455312878627147979955904".parse::<BigDecimal>().unwrap());

let n: BigDecimal = "-9.238597585E+84".parse().unwrap();
assert_eq!(n.cube(), "-7.88529874035334084567570176625E+254".parse::<BigDecimal>().unwrap());
Source

pub fn powi(&self, exp: i64) -> BigDecimal

Raises the number to an integer power

Uses default-precision, set from build time environment variable

let n: BigDecimal = 2.into();
assert_eq!(n.powi(3000000000), "9.816204233623505350831385407878283564899139328691307267002649220552261820356883420275966921502700387e903089986".parse::<BigDecimal>().unwrap());
Source

pub fn powi_with_context(&self, exp: i64, ctx: &Context) -> BigDecimal

Raises the number to an integer power, using context for precision and rounding

Source

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

Take the square root of the number

Uses default-precision, set from build time environment variable

If the value is < 0, None is returned

let n: BigDecimal = "1.1156024145937225657484".parse().unwrap();
assert_eq!(n.sqrt().unwrap(), "1.056220817156016181190291268045893004363809142172289919023269377496528394924695970851558013658193913".parse::<BigDecimal>().unwrap());

let n: BigDecimal = "-9.238597585E+84".parse().unwrap();
assert_eq!(n.sqrt(), None);
Source

pub fn sqrt_with_context(&self, ctx: &Context) -> Option<BigDecimal>

Take the square root of the number, using context for precision and rounding

Source

pub fn cbrt(&self) -> BigDecimal

Take the cube root of the number, using default context

Source

pub fn cbrt_with_context(&self, ctx: &Context) -> BigDecimal

Take cube root of self, using properties of context

Source

pub fn inverse(&self) -> BigDecimal

Compute the reciprical of the number: x-1

Source

pub fn inverse_with_context(&self, ctx: &Context) -> BigDecimal

Return inverse of self, rounding with ctx

Source

pub fn mul_with_context<'a, T>(&'a self, rhs: T, ctx: &Context) -> BigDecimal
where T: Into<BigDecimalRef<'a>>,

Multiply by rhs, limiting precision using context

Source

pub fn round(&self, round_digits: i64) -> BigDecimal

Return given number rounded to ‘round_digits’ precision after the decimal point, using default rounding mode

Default rounding mode is HalfEven, but can be configured at compile-time by the environment variable: RUST_BIGDECIMAL_DEFAULT_ROUNDING_MODE (or by patching build.rs )

Source

pub fn is_integer(&self) -> bool

Return true if this number has zero fractional part (is equal to an integer)

Source

pub fn is_one_quickcheck(&self) -> Option<bool>

Try to determine if decimal is 1.0, without allocating

Source

pub fn exp(&self) -> BigDecimal

Evaluate the natural-exponential function ex

Source

pub fn exp_with_context(&self, ctx: &Context) -> BigDecimal

Evaluate the natural-exponential function ex to specific precision

Source

pub fn normalized(&self) -> BigDecimal

Source

pub fn to_plain_string(&self) -> String

Create string of decimal in standard decimal notation.

Unlike standard formatter, this never prints the number in scientific notation.

§Panics

If the magnitude of the exponent is very large, this may cause out-of-memory errors, or overflowing panics.

§Examples
let n: BigDecimal = "123.45678".parse().unwrap();
assert_eq!(&n.to_plain_string(), "123.45678");

let n: BigDecimal = "1e-10".parse().unwrap();
assert_eq!(&n.to_plain_string(), "0.0000000001");
Source

pub fn write_plain_string<W>(&self, wtr: &mut W) -> Result<(), Error>
where W: Write,

Write decimal value in decimal notation to the writer object.

§Panics

If the exponent is very large or very small, the number of this will print that many trailing or leading zeros. If exabytes, this will likely panic.

Source

pub fn to_scientific_notation(&self) -> String

Create string of this bigdecimal in scientific notation

let n = BigDecimal::from(12345678);
assert_eq!(&n.to_scientific_notation(), "1.2345678e7");
Source

pub fn write_scientific_notation<W>(&self, w: &mut W) -> Result<(), Error>
where W: Write,

Write bigdecimal in scientific notation to writer w

Source

pub fn to_engineering_notation(&self) -> String

Create string of this bigdecimal in engineering notation

Engineering notation is scientific notation with the exponent coerced to a multiple of three

let n = BigDecimal::from(12345678);
assert_eq!(&n.to_engineering_notation(), "12.345678e6");
Source

pub fn write_engineering_notation<W>(&self, w: &mut W) -> Result<(), Error>
where W: Write,

Write bigdecimal in engineering notation to writer w

Trait Implementations§

Source§

impl Add for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the + operator.
Source§

fn add(self, rhs: BigDecimal) -> BigDecimal

Performs the + operation. Read more
Source§

impl Add<&i8> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &i8) -> BigDecimal

Performs the + operation. Read more
Source§

impl Add<&i8> for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &i8) -> BigDecimal

Performs the + operation. Read more
Source§

impl Add<&i16> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &i16) -> BigDecimal

Performs the + operation. Read more
Source§

impl Add<&i16> for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &i16) -> BigDecimal

Performs the + operation. Read more
Source§

impl Add<&i32> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &i32) -> BigDecimal

Performs the + operation. Read more
Source§

impl Add<&i32> for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &i32) -> BigDecimal

Performs the + operation. Read more
Source§

impl Add<&i64> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &i64) -> BigDecimal

Performs the + operation. Read more
Source§

impl Add<&i64> for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &i64) -> BigDecimal

Performs the + operation. Read more
Source§

impl Add<&i128> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &i128) -> BigDecimal

Performs the + operation. Read more
Source§

impl Add<&i128> for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &i128) -> BigDecimal

Performs the + operation. Read more
Source§

impl Add<&u8> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &u8) -> BigDecimal

Performs the + operation. Read more
Source§

impl Add<&u8> for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &u8) -> BigDecimal

Performs the + operation. Read more
Source§

impl Add<&u16> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &u16) -> BigDecimal

Performs the + operation. Read more
Source§

impl Add<&u16> for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &u16) -> BigDecimal

Performs the + operation. Read more
Source§

impl Add<&u32> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &u32) -> BigDecimal

Performs the + operation. Read more
Source§

impl Add<&u32> for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &u32) -> BigDecimal

Performs the + operation. Read more
Source§

impl Add<&u64> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &u64) -> BigDecimal

Performs the + operation. Read more
Source§

impl Add<&u64> for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &u64) -> BigDecimal

Performs the + operation. Read more
Source§

impl Add<&u128> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &u128) -> BigDecimal

Performs the + operation. Read more
Source§

impl Add<&u128> for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &u128) -> BigDecimal

Performs the + operation. Read more
Source§

impl Add<BigDecimal> for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the + operator.
Source§

fn add(self, rhs: BigDecimal) -> BigDecimal

Performs the + operation. Read more
Source§

impl Add<BigInt> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the + operator.
Source§

fn add(self, rhs: BigInt) -> BigDecimal

Performs the + operation. Read more
Source§

impl Add<BigInt> for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the + operator.
Source§

fn add(self, rhs: BigInt) -> BigDecimal

Performs the + operation. Read more
Source§

impl<'a, T> Add<T> for BigDecimal
where T: Into<BigDecimalRef<'a>>,

Source§

type Output = BigDecimal

The resulting type after applying the + operator.
Source§

fn add(self, rhs: T) -> BigDecimal

Performs the + operation. Read more
Source§

impl<'a, T> Add<T> for &BigDecimal
where T: Into<BigDecimalRef<'a>>,

Source§

type Output = BigDecimal

The resulting type after applying the + operator.
Source§

fn add(self, rhs: T) -> BigDecimal

Performs the + operation. Read more
Source§

impl Add<i8> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the + operator.
Source§

fn add(self, rhs: i8) -> BigDecimal

Performs the + operation. Read more
Source§

impl Add<i8> for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the + operator.
Source§

fn add(self, rhs: i8) -> BigDecimal

Performs the + operation. Read more
Source§

impl Add<i16> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the + operator.
Source§

fn add(self, rhs: i16) -> BigDecimal

Performs the + operation. Read more
Source§

impl Add<i16> for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the + operator.
Source§

fn add(self, rhs: i16) -> BigDecimal

Performs the + operation. Read more
Source§

impl Add<i32> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the + operator.
Source§

fn add(self, rhs: i32) -> BigDecimal

Performs the + operation. Read more
Source§

impl Add<i32> for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the + operator.
Source§

fn add(self, rhs: i32) -> BigDecimal

Performs the + operation. Read more
Source§

impl Add<i64> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the + operator.
Source§

fn add(self, rhs: i64) -> BigDecimal

Performs the + operation. Read more
Source§

impl Add<i64> for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the + operator.
Source§

fn add(self, rhs: i64) -> BigDecimal

Performs the + operation. Read more
Source§

impl Add<i128> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the + operator.
Source§

fn add(self, rhs: i128) -> BigDecimal

Performs the + operation. Read more
Source§

impl Add<i128> for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the + operator.
Source§

fn add(self, rhs: i128) -> BigDecimal

Performs the + operation. Read more
Source§

impl Add<u8> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the + operator.
Source§

fn add(self, rhs: u8) -> BigDecimal

Performs the + operation. Read more
Source§

impl Add<u8> for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the + operator.
Source§

fn add(self, rhs: u8) -> BigDecimal

Performs the + operation. Read more
Source§

impl Add<u16> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the + operator.
Source§

fn add(self, rhs: u16) -> BigDecimal

Performs the + operation. Read more
Source§

impl Add<u16> for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the + operator.
Source§

fn add(self, rhs: u16) -> BigDecimal

Performs the + operation. Read more
Source§

impl Add<u32> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the + operator.
Source§

fn add(self, rhs: u32) -> BigDecimal

Performs the + operation. Read more
Source§

impl Add<u32> for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the + operator.
Source§

fn add(self, rhs: u32) -> BigDecimal

Performs the + operation. Read more
Source§

impl Add<u64> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the + operator.
Source§

fn add(self, rhs: u64) -> BigDecimal

Performs the + operation. Read more
Source§

impl Add<u64> for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the + operator.
Source§

fn add(self, rhs: u64) -> BigDecimal

Performs the + operation. Read more
Source§

impl Add<u128> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the + operator.
Source§

fn add(self, rhs: u128) -> BigDecimal

Performs the + operation. Read more
Source§

impl Add<u128> for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the + operator.
Source§

fn add(self, rhs: u128) -> BigDecimal

Performs the + operation. Read more
Source§

impl AddAssign for BigDecimal

Source§

fn add_assign(&mut self, rhs: BigDecimal)

Performs the += operation. Read more
Source§

impl AddAssign<&i8> for BigDecimal

Source§

fn add_assign(&mut self, rhs: &i8)

Performs the += operation. Read more
Source§

impl AddAssign<&i16> for BigDecimal

Source§

fn add_assign(&mut self, rhs: &i16)

Performs the += operation. Read more
Source§

impl AddAssign<&i32> for BigDecimal

Source§

fn add_assign(&mut self, rhs: &i32)

Performs the += operation. Read more
Source§

impl AddAssign<&i64> for BigDecimal

Source§

fn add_assign(&mut self, rhs: &i64)

Performs the += operation. Read more
Source§

impl AddAssign<&i128> for BigDecimal

Source§

fn add_assign(&mut self, rhs: &i128)

Performs the += operation. Read more
Source§

impl AddAssign<&u8> for BigDecimal

Source§

fn add_assign(&mut self, rhs: &u8)

Performs the += operation. Read more
Source§

impl AddAssign<&u16> for BigDecimal

Source§

fn add_assign(&mut self, rhs: &u16)

Performs the += operation. Read more
Source§

impl AddAssign<&u32> for BigDecimal

Source§

fn add_assign(&mut self, rhs: &u32)

Performs the += operation. Read more
Source§

impl AddAssign<&u64> for BigDecimal

Source§

fn add_assign(&mut self, rhs: &u64)

Performs the += operation. Read more
Source§

impl AddAssign<&u128> for BigDecimal

Source§

fn add_assign(&mut self, rhs: &u128)

Performs the += operation. Read more
Source§

impl AddAssign<BigInt> for BigDecimal

Source§

fn add_assign(&mut self, rhs: BigInt)

Performs the += operation. Read more
Source§

impl<'a, N> AddAssign<N> for BigDecimal
where N: Into<BigDecimalRef<'a>>,

Source§

fn add_assign(&mut self, rhs: N)

Performs the += operation. Read more
Source§

impl AddAssign<i8> for BigDecimal

Source§

fn add_assign(&mut self, rhs: i8)

Performs the += operation. Read more
Source§

impl AddAssign<i16> for BigDecimal

Source§

fn add_assign(&mut self, rhs: i16)

Performs the += operation. Read more
Source§

impl AddAssign<i32> for BigDecimal

Source§

fn add_assign(&mut self, rhs: i32)

Performs the += operation. Read more
Source§

impl AddAssign<i64> for BigDecimal

Source§

fn add_assign(&mut self, rhs: i64)

Performs the += operation. Read more
Source§

impl AddAssign<i128> for BigDecimal

Source§

fn add_assign(&mut self, rhs: i128)

Performs the += operation. Read more
Source§

impl AddAssign<u8> for BigDecimal

Source§

fn add_assign(&mut self, rhs: u8)

Performs the += operation. Read more
Source§

impl AddAssign<u16> for BigDecimal

Source§

fn add_assign(&mut self, rhs: u16)

Performs the += operation. Read more
Source§

impl AddAssign<u32> for BigDecimal

Source§

fn add_assign(&mut self, rhs: u32)

Performs the += operation. Read more
Source§

impl AddAssign<u64> for BigDecimal

Source§

fn add_assign(&mut self, rhs: u64)

Performs the += operation. Read more
Source§

impl AddAssign<u128> for BigDecimal

Source§

fn add_assign(&mut self, rhs: u128)

Performs the += operation. Read more
Source§

impl Clone for BigDecimal

Source§

fn clone(&self) -> BigDecimal

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for BigDecimal

Source§

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

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

impl Decode for BigDecimal

Source§

fn decode(row: &AnyRow, index: usize) -> Result<BigDecimal, Error>

Decode the column at the zero-based position index. Read more
Source§

const NULLABLE: bool = false

Whether SQL NULL decodes into this type, as it does into Option<T>. When false, AnyRow::try_get fails on NULL without calling Decode::decode.
Source§

impl Decode<'_, MySql> for BigDecimal

Source§

fn decode( value: MySqlValueRef<'_>, ) -> Result<BigDecimal, Box<dyn Error + Sync + Send>>

Decode a new value of this type using a raw value from the database.
Source§

impl Decode<'_, Postgres> for BigDecimal

§Note: NaN

BigDecimal has a greater range than NUMERIC (see the corresponding Encode impl for details) but cannot represent NaN, so decoding may return an error.

Source§

fn decode( value: PgValueRef<'_>, ) -> Result<BigDecimal, Box<dyn Error + Sync + Send>>

Decode a new value of this type using a raw value from the database.
Source§

impl Default for BigDecimal

Source§

fn default() -> BigDecimal

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

impl<'de> Deserialize<'de> for BigDecimal

Available on non-crate feature string-only only.
Source§

fn deserialize<D>(d: D) -> Result<BigDecimal, <D as Deserializer<'de>>::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Display for BigDecimal

Source§

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

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

impl Div for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the / operator.
Source§

fn div(self, other: BigDecimal) -> BigDecimal

Performs the / operation. Read more
Source§

impl<'a> Div<&'a BigDecimal> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the / operator.
Source§

fn div(self, other: &'a BigDecimal) -> BigDecimal

Performs the / operation. Read more
Source§

impl Div<&BigDecimal> for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<&f32> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the / operator.
Source§

fn div(self, denom: &f32) -> BigDecimal

Performs the / operation. Read more
Source§

impl Div<&f64> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the / operator.
Source§

fn div(self, denom: &f64) -> BigDecimal

Performs the / operation. Read more
Source§

impl Div<&i8> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the / operator.
Source§

fn div(self, denom: &i8) -> BigDecimal

Performs the / operation. Read more
Source§

impl Div<&i16> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the / operator.
Source§

fn div(self, denom: &i16) -> BigDecimal

Performs the / operation. Read more
Source§

impl Div<&i32> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the / operator.
Source§

fn div(self, denom: &i32) -> BigDecimal

Performs the / operation. Read more
Source§

impl Div<&i64> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the / operator.
Source§

fn div(self, denom: &i64) -> BigDecimal

Performs the / operation. Read more
Source§

impl Div<&i128> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the / operator.
Source§

fn div(self, denom: &i128) -> BigDecimal

Performs the / operation. Read more
Source§

impl Div<&u8> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the / operator.
Source§

fn div(self, denom: &u8) -> BigDecimal

Performs the / operation. Read more
Source§

impl Div<&u16> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the / operator.
Source§

fn div(self, denom: &u16) -> BigDecimal

Performs the / operation. Read more
Source§

impl Div<&u32> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the / operator.
Source§

fn div(self, denom: &u32) -> BigDecimal

Performs the / operation. Read more
Source§

impl Div<&u64> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the / operator.
Source§

fn div(self, denom: &u64) -> BigDecimal

Performs the / operation. Read more
Source§

impl Div<&u128> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the / operator.
Source§

fn div(self, denom: &u128) -> BigDecimal

Performs the / operation. Read more
Source§

impl<'a> Div<BigDecimal> for &'a BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the / operator.
Source§

fn div(self, other: BigDecimal) -> BigDecimal

Performs the / operation. Read more
Source§

impl Div<f32> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the / operator.
Source§

fn div(self, denom: f32) -> BigDecimal

Performs the / operation. Read more
Source§

impl Div<f32> for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the / operator.
Source§

fn div(self, denom: f32) -> BigDecimal

Performs the / operation. Read more
Source§

impl Div<f64> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the / operator.
Source§

fn div(self, denom: f64) -> BigDecimal

Performs the / operation. Read more
Source§

impl Div<f64> for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the / operator.
Source§

fn div(self, denom: f64) -> BigDecimal

Performs the / operation. Read more
Source§

impl Div<i8> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the / operator.
Source§

fn div(self, denom: i8) -> BigDecimal

Performs the / operation. Read more
Source§

impl Div<i8> for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the / operator.
Source§

fn div(self, denom: i8) -> BigDecimal

Performs the / operation. Read more
Source§

impl Div<i16> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the / operator.
Source§

fn div(self, denom: i16) -> BigDecimal

Performs the / operation. Read more
Source§

impl Div<i16> for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the / operator.
Source§

fn div(self, denom: i16) -> BigDecimal

Performs the / operation. Read more
Source§

impl Div<i32> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the / operator.
Source§

fn div(self, denom: i32) -> BigDecimal

Performs the / operation. Read more
Source§

impl Div<i32> for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the / operator.
Source§

fn div(self, denom: i32) -> BigDecimal

Performs the / operation. Read more
Source§

impl Div<i64> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the / operator.
Source§

fn div(self, denom: i64) -> BigDecimal

Performs the / operation. Read more
Source§

impl Div<i64> for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the / operator.
Source§

fn div(self, denom: i64) -> BigDecimal

Performs the / operation. Read more
Source§

impl Div<i128> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the / operator.
Source§

fn div(self, denom: i128) -> BigDecimal

Performs the / operation. Read more
Source§

impl Div<i128> for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the / operator.
Source§

fn div(self, denom: i128) -> BigDecimal

Performs the / operation. Read more
Source§

impl Div<u8> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the / operator.
Source§

fn div(self, denom: u8) -> BigDecimal

Performs the / operation. Read more
Source§

impl Div<u8> for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the / operator.
Source§

fn div(self, denom: u8) -> BigDecimal

Performs the / operation. Read more
Source§

impl Div<u16> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the / operator.
Source§

fn div(self, denom: u16) -> BigDecimal

Performs the / operation. Read more
Source§

impl Div<u16> for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the / operator.
Source§

fn div(self, denom: u16) -> BigDecimal

Performs the / operation. Read more
Source§

impl Div<u32> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the / operator.
Source§

fn div(self, denom: u32) -> BigDecimal

Performs the / operation. Read more
Source§

impl Div<u32> for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the / operator.
Source§

fn div(self, denom: u32) -> BigDecimal

Performs the / operation. Read more
Source§

impl Div<u64> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the / operator.
Source§

fn div(self, denom: u64) -> BigDecimal

Performs the / operation. Read more
Source§

impl Div<u64> for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the / operator.
Source§

fn div(self, denom: u64) -> BigDecimal

Performs the / operation. Read more
Source§

impl Div<u128> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the / operator.
Source§

fn div(self, denom: u128) -> BigDecimal

Performs the / operation. Read more
Source§

impl Div<u128> for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the / operator.
Source§

fn div(self, denom: u128) -> BigDecimal

Performs the / operation. Read more
Source§

impl DivAssign<&f32> for BigDecimal

Source§

fn div_assign(&mut self, denom: &f32)

Performs the /= operation. Read more
Source§

impl DivAssign<&f64> for BigDecimal

Source§

fn div_assign(&mut self, denom: &f64)

Performs the /= operation. Read more
Source§

impl DivAssign<&i8> for BigDecimal

Source§

fn div_assign(&mut self, denom: &i8)

Performs the /= operation. Read more
Source§

impl DivAssign<&i16> for BigDecimal

Source§

fn div_assign(&mut self, denom: &i16)

Performs the /= operation. Read more
Source§

impl DivAssign<&i32> for BigDecimal

Source§

fn div_assign(&mut self, denom: &i32)

Performs the /= operation. Read more
Source§

impl DivAssign<&i64> for BigDecimal

Source§

fn div_assign(&mut self, denom: &i64)

Performs the /= operation. Read more
Source§

impl DivAssign<&i128> for BigDecimal

Source§

fn div_assign(&mut self, denom: &i128)

Performs the /= operation. Read more
Source§

impl DivAssign<&u8> for BigDecimal

Source§

fn div_assign(&mut self, denom: &u8)

Performs the /= operation. Read more
Source§

impl DivAssign<&u16> for BigDecimal

Source§

fn div_assign(&mut self, denom: &u16)

Performs the /= operation. Read more
Source§

impl DivAssign<&u32> for BigDecimal

Source§

fn div_assign(&mut self, denom: &u32)

Performs the /= operation. Read more
Source§

impl DivAssign<&u64> for BigDecimal

Source§

fn div_assign(&mut self, denom: &u64)

Performs the /= operation. Read more
Source§

impl DivAssign<&u128> for BigDecimal

Source§

fn div_assign(&mut self, denom: &u128)

Performs the /= operation. Read more
Source§

impl DivAssign<f32> for BigDecimal

Source§

fn div_assign(&mut self, denom: f32)

Performs the /= operation. Read more
Source§

impl DivAssign<f64> for BigDecimal

Source§

fn div_assign(&mut self, denom: f64)

Performs the /= operation. Read more
Source§

impl DivAssign<i8> for BigDecimal

Source§

fn div_assign(&mut self, rhs: i8)

Performs the /= operation. Read more
Source§

impl DivAssign<i16> for BigDecimal

Source§

fn div_assign(&mut self, rhs: i16)

Performs the /= operation. Read more
Source§

impl DivAssign<i32> for BigDecimal

Source§

fn div_assign(&mut self, rhs: i32)

Performs the /= operation. Read more
Source§

impl DivAssign<i64> for BigDecimal

Source§

fn div_assign(&mut self, rhs: i64)

Performs the /= operation. Read more
Source§

impl DivAssign<i128> for BigDecimal

Source§

fn div_assign(&mut self, rhs: i128)

Performs the /= operation. Read more
Source§

impl DivAssign<u8> for BigDecimal

Source§

fn div_assign(&mut self, rhs: u8)

Performs the /= operation. Read more
Source§

impl DivAssign<u16> for BigDecimal

Source§

fn div_assign(&mut self, rhs: u16)

Performs the /= operation. Read more
Source§

impl DivAssign<u32> for BigDecimal

Source§

fn div_assign(&mut self, rhs: u32)

Performs the /= operation. Read more
Source§

impl DivAssign<u64> for BigDecimal

Source§

fn div_assign(&mut self, rhs: u64)

Performs the /= operation. Read more
Source§

impl DivAssign<u128> for BigDecimal

Source§

fn div_assign(&mut self, rhs: u128)

Performs the /= operation. Read more
Source§

impl Encode<'_, MySql> for BigDecimal

Source§

fn encode_by_ref( &self, buf: &mut Vec<u8>, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>

Writes the value of self into buf without moving self. Read more
Source§

fn encode( self, buf: &mut <DB as Database>::ArgumentBuffer, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>
where Self: Sized,

Writes the value of self into buf in the expected format for the database.
Source§

fn produces(&self) -> Option<<DB as Database>::TypeInfo>

Source§

fn size_hint(&self) -> usize

Source§

impl Encode<'_, Postgres> for BigDecimal

§Note: BigDecimal Has a Larger Range than NUMERIC

BigDecimal can represent values with a far, far greater range than the NUMERIC type in Postgres can.

NUMERIC is limited to 131,072 digits before the decimal point, and 16,384 digits after it. See Section 8.1, Numeric Types of the Postgres manual for details.

Meanwhile, BigDecimal can theoretically represent a value with an arbitrary number of decimal digits, albeit with a maximum of 263 significant figures.

Because encoding in the current API design must be infallible, when attempting to encode a BigDecimal that cannot fit in the wire representation of NUMERIC, SQLx may instead encode a sentinel value that falls outside the allowed range but is still representable.

This will cause the query to return a DatabaseError with code 22P03 (invalid_binary_representation) and the error message invalid scale in external "numeric" value (though this may be subject to change).

However, BigDecimal should be able to decode any NUMERIC value except NaN, for which it has no representation.

Source§

fn encode_by_ref( &self, buf: &mut PgArgumentBuffer, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>

Writes the value of self into buf without moving self. Read more
Source§

fn size_hint(&self) -> usize

Source§

fn encode( self, buf: &mut <DB as Database>::ArgumentBuffer, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>
where Self: Sized,

Writes the value of self into buf in the expected format for the database.
Source§

fn produces(&self) -> Option<<DB as Database>::TypeInfo>

Source§

impl Eq for BigDecimal

Source§

impl<'a> From<&&'a BigDecimal> for Value<'a>

Source§

fn from(value: &&'a BigDecimal) -> Value<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a BigDecimal> for Value<'a>

Source§

fn from(value: &'a BigDecimal) -> Value<'a>

Converts to this type from the input type.
Source§

impl From<&i8> for BigDecimal

Source§

fn from(n: &i8) -> BigDecimal

Converts to this type from the input type.
Source§

impl From<&i16> for BigDecimal

Source§

fn from(n: &i16) -> BigDecimal

Converts to this type from the input type.
Source§

impl From<&i32> for BigDecimal

Source§

fn from(n: &i32) -> BigDecimal

Converts to this type from the input type.
Source§

impl From<&i64> for BigDecimal

Source§

fn from(n: &i64) -> BigDecimal

Converts to this type from the input type.
Source§

impl From<&i128> for BigDecimal

Source§

fn from(n: &i128) -> BigDecimal

Converts to this type from the input type.
Source§

impl From<&u8> for BigDecimal

Source§

fn from(n: &u8) -> BigDecimal

Converts to this type from the input type.
Source§

impl From<&u16> for BigDecimal

Source§

fn from(n: &u16) -> BigDecimal

Converts to this type from the input type.
Source§

impl From<&u32> for BigDecimal

Source§

fn from(n: &u32) -> BigDecimal

Converts to this type from the input type.
Source§

impl From<&u64> for BigDecimal

Source§

fn from(n: &u64) -> BigDecimal

Converts to this type from the input type.
Source§

impl From<&u128> for BigDecimal

Source§

fn from(n: &u128) -> BigDecimal

Converts to this type from the input type.
Source§

impl<T> From<(T, i64)> for BigDecimal
where T: Into<BigInt>,

Source§

fn from(_: (T, i64)) -> BigDecimal

Converts to this type from the input type.
Source§

impl From<BigDecimal> for Value<'_>

Source§

fn from(value: BigDecimal) -> Value<'_>

Converts to this type from the input type.
Source§

impl From<BigInt> for BigDecimal

Source§

fn from(int_val: BigInt) -> BigDecimal

Converts to this type from the input type.
Source§

impl From<WithScale<BigUint>> for BigDecimal

Source§

fn from(obj: WithScale<BigUint>) -> BigDecimal

Converts to this type from the input type.
Source§

impl From<i8> for BigDecimal

Source§

fn from(n: i8) -> BigDecimal

Converts to this type from the input type.
Source§

impl From<i16> for BigDecimal

Source§

fn from(n: i16) -> BigDecimal

Converts to this type from the input type.
Source§

impl From<i32> for BigDecimal

Source§

fn from(n: i32) -> BigDecimal

Converts to this type from the input type.
Source§

impl From<i64> for BigDecimal

Source§

fn from(n: i64) -> BigDecimal

Converts to this type from the input type.
Source§

impl From<i128> for BigDecimal

Source§

fn from(n: i128) -> BigDecimal

Converts to this type from the input type.
Source§

impl From<u8> for BigDecimal

Source§

fn from(n: u8) -> BigDecimal

Converts to this type from the input type.
Source§

impl From<u16> for BigDecimal

Source§

fn from(n: u16) -> BigDecimal

Converts to this type from the input type.
Source§

impl From<u32> for BigDecimal

Source§

fn from(n: u32) -> BigDecimal

Converts to this type from the input type.
Source§

impl From<u64> for BigDecimal

Source§

fn from(n: u64) -> BigDecimal

Converts to this type from the input type.
Source§

impl From<u128> for BigDecimal

Source§

fn from(n: u128) -> BigDecimal

Converts to this type from the input type.
Source§

impl FromPrimitive for BigDecimal

Source§

fn from_i64(n: i64) -> Option<BigDecimal>

Converts an i64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u64(n: u64) -> Option<BigDecimal>

Converts an u64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_i128(n: i128) -> Option<BigDecimal>

Converts an i128 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
Source§

fn from_u128(n: u128) -> Option<BigDecimal>

Converts an u128 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
Source§

fn from_f32(n: f32) -> Option<BigDecimal>

Converts a f32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_f64(n: f64) -> Option<BigDecimal>

Converts a f64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
Source§

fn from_isize(n: isize) -> Option<Self>

Converts an isize to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_i8(n: i8) -> Option<Self>

Converts an i8 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_i16(n: i16) -> Option<Self>

Converts an i16 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_i32(n: i32) -> Option<Self>

Converts an i32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_usize(n: usize) -> Option<Self>

Converts a usize to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u8(n: u8) -> Option<Self>

Converts an u8 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u16(n: u16) -> Option<Self>

Converts an u16 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u32(n: u32) -> Option<Self>

Converts an u32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

impl FromStr for BigDecimal

Source§

type Err = ParseBigDecimalError

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

fn from_str(s: &str) -> Result<BigDecimal, ParseBigDecimalError>

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

impl Hash for BigDecimal

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 JsonElement for BigDecimal

Source§

impl LowerExp for BigDecimal

Source§

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

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

impl Mul for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: BigDecimal) -> BigDecimal

Performs the * operation. Read more
Source§

impl Mul<&BigDecimal> for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &BigDecimal) -> BigDecimal

Performs the * operation. Read more
Source§

impl Mul<&BigInt> for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &BigInt) -> <&BigDecimal as Mul<&BigInt>>::Output

Performs the * operation. Read more
Source§

impl Mul<&BigUint> for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &BigUint) -> <&BigDecimal as Mul<&BigUint>>::Output

Performs the * operation. Read more
Source§

impl Mul<&i8> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &i8) -> BigDecimal

Performs the * operation. Read more
Source§

impl Mul<&i8> for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &i8) -> BigDecimal

Performs the * operation. Read more
Source§

impl Mul<&i16> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &i16) -> BigDecimal

Performs the * operation. Read more
Source§

impl Mul<&i16> for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &i16) -> BigDecimal

Performs the * operation. Read more
Source§

impl Mul<&i32> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &i32) -> BigDecimal

Performs the * operation. Read more
Source§

impl Mul<&i32> for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &i32) -> BigDecimal

Performs the * operation. Read more
Source§

impl Mul<&i64> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &i64) -> BigDecimal

Performs the * operation. Read more
Source§

impl Mul<&i64> for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &i64) -> BigDecimal

Performs the * operation. Read more
Source§

impl Mul<&i128> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &i128) -> BigDecimal

Performs the * operation. Read more
Source§

impl Mul<&i128> for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &i128) -> BigDecimal

Performs the * operation. Read more
Source§

impl Mul<&u8> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &u8) -> BigDecimal

Performs the * operation. Read more
Source§

impl Mul<&u8> for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &u8) -> BigDecimal

Performs the * operation. Read more
Source§

impl Mul<&u16> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &u16) -> BigDecimal

Performs the * operation. Read more
Source§

impl Mul<&u16> for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &u16) -> BigDecimal

Performs the * operation. Read more
Source§

impl Mul<&u32> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &u32) -> BigDecimal

Performs the * operation. Read more
Source§

impl Mul<&u32> for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &u32) -> BigDecimal

Performs the * operation. Read more
Source§

impl Mul<&u64> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &u64) -> BigDecimal

Performs the * operation. Read more
Source§

impl Mul<&u64> for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &u64) -> BigDecimal

Performs the * operation. Read more
Source§

impl Mul<&u128> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &u128) -> BigDecimal

Performs the * operation. Read more
Source§

impl Mul<&u128> for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &u128) -> BigDecimal

Performs the * operation. Read more
Source§

impl Mul<BigDecimal> for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: BigDecimal) -> BigDecimal

Performs the * operation. Read more
Source§

impl Mul<BigInt> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: BigInt) -> BigDecimal

Performs the * operation. Read more
Source§

impl Mul<BigInt> for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: BigInt) -> BigDecimal

Performs the * operation. Read more
Source§

impl Mul<BigUint> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: BigUint) -> BigDecimal

Performs the * operation. Read more
Source§

impl Mul<BigUint> for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: BigUint) -> BigDecimal

Performs the * operation. Read more
Source§

impl<'a, N> Mul<N> for BigDecimal
where N: Into<BigDecimalRef<'a>>,

Source§

type Output = BigDecimal

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: N) -> <BigDecimal as Mul<N>>::Output

Performs the * operation. Read more
Source§

impl Mul<i8> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: i8) -> BigDecimal

Performs the * operation. Read more
Source§

impl Mul<i8> for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: i8) -> BigDecimal

Performs the * operation. Read more
Source§

impl Mul<i16> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: i16) -> BigDecimal

Performs the * operation. Read more
Source§

impl Mul<i16> for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: i16) -> BigDecimal

Performs the * operation. Read more
Source§

impl Mul<i32> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: i32) -> BigDecimal

Performs the * operation. Read more
Source§

impl Mul<i32> for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: i32) -> BigDecimal

Performs the * operation. Read more
Source§

impl Mul<i64> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: i64) -> BigDecimal

Performs the * operation. Read more
Source§

impl Mul<i64> for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: i64) -> BigDecimal

Performs the * operation. Read more
Source§

impl Mul<i128> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: i128) -> BigDecimal

Performs the * operation. Read more
Source§

impl Mul<i128> for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: i128) -> BigDecimal

Performs the * operation. Read more
Source§

impl Mul<u8> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: u8) -> BigDecimal

Performs the * operation. Read more
Source§

impl Mul<u8> for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: u8) -> BigDecimal

Performs the * operation. Read more
Source§

impl Mul<u16> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: u16) -> BigDecimal

Performs the * operation. Read more
Source§

impl Mul<u16> for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: u16) -> BigDecimal

Performs the * operation. Read more
Source§

impl Mul<u32> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: u32) -> BigDecimal

Performs the * operation. Read more
Source§

impl Mul<u32> for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: u32) -> BigDecimal

Performs the * operation. Read more
Source§

impl Mul<u64> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: u64) -> BigDecimal

Performs the * operation. Read more
Source§

impl Mul<u64> for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: u64) -> BigDecimal

Performs the * operation. Read more
Source§

impl Mul<u128> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: u128) -> BigDecimal

Performs the * operation. Read more
Source§

impl Mul<u128> for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: u128) -> BigDecimal

Performs the * operation. Read more
Source§

impl MulAssign for BigDecimal

Source§

fn mul_assign(&mut self, rhs: BigDecimal)

Performs the *= operation. Read more
Source§

impl MulAssign<&i8> for BigDecimal

Source§

fn mul_assign(&mut self, rhs: &i8)

Performs the *= operation. Read more
Source§

impl MulAssign<&i16> for BigDecimal

Source§

fn mul_assign(&mut self, rhs: &i16)

Performs the *= operation. Read more
Source§

impl MulAssign<&i32> for BigDecimal

Source§

fn mul_assign(&mut self, rhs: &i32)

Performs the *= operation. Read more
Source§

impl MulAssign<&i64> for BigDecimal

Source§

fn mul_assign(&mut self, rhs: &i64)

Performs the *= operation. Read more
Source§

impl MulAssign<&i128> for BigDecimal

Source§

fn mul_assign(&mut self, rhs: &i128)

Performs the *= operation. Read more
Source§

impl MulAssign<&u8> for BigDecimal

Source§

fn mul_assign(&mut self, rhs: &u8)

Performs the *= operation. Read more
Source§

impl MulAssign<&u16> for BigDecimal

Source§

fn mul_assign(&mut self, rhs: &u16)

Performs the *= operation. Read more
Source§

impl MulAssign<&u32> for BigDecimal

Source§

fn mul_assign(&mut self, rhs: &u32)

Performs the *= operation. Read more
Source§

impl MulAssign<&u64> for BigDecimal

Source§

fn mul_assign(&mut self, rhs: &u64)

Performs the *= operation. Read more
Source§

impl MulAssign<&u128> for BigDecimal

Source§

fn mul_assign(&mut self, rhs: &u128)

Performs the *= operation. Read more
Source§

impl MulAssign<BigInt> for BigDecimal

Source§

fn mul_assign(&mut self, rhs: BigInt)

Performs the *= operation. Read more
Source§

impl MulAssign<BigUint> for BigDecimal

Source§

fn mul_assign(&mut self, rhs: BigUint)

Performs the *= operation. Read more
Source§

impl<'a, N> MulAssign<N> for BigDecimal
where N: Into<BigDecimalRef<'a>>,

Source§

fn mul_assign(&mut self, rhs: N)

Performs the *= operation. Read more
Source§

impl MulAssign<i8> for BigDecimal

Source§

fn mul_assign(&mut self, rhs: i8)

Performs the *= operation. Read more
Source§

impl MulAssign<i16> for BigDecimal

Source§

fn mul_assign(&mut self, rhs: i16)

Performs the *= operation. Read more
Source§

impl MulAssign<i32> for BigDecimal

Source§

fn mul_assign(&mut self, rhs: i32)

Performs the *= operation. Read more
Source§

impl MulAssign<i64> for BigDecimal

Source§

fn mul_assign(&mut self, rhs: i64)

Performs the *= operation. Read more
Source§

impl MulAssign<i128> for BigDecimal

Source§

fn mul_assign(&mut self, rhs: i128)

Performs the *= operation. Read more
Source§

impl MulAssign<u8> for BigDecimal

Source§

fn mul_assign(&mut self, rhs: u8)

Performs the *= operation. Read more
Source§

impl MulAssign<u16> for BigDecimal

Source§

fn mul_assign(&mut self, rhs: u16)

Performs the *= operation. Read more
Source§

impl MulAssign<u32> for BigDecimal

Source§

fn mul_assign(&mut self, rhs: u32)

Performs the *= operation. Read more
Source§

impl MulAssign<u64> for BigDecimal

Source§

fn mul_assign(&mut self, rhs: u64)

Performs the *= operation. Read more
Source§

impl MulAssign<u128> for BigDecimal

Source§

fn mul_assign(&mut self, rhs: u128)

Performs the *= operation. Read more
Source§

impl Neg for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the - operator.
Source§

fn neg(self) -> BigDecimal

Performs the unary - operation. Read more
Source§

impl Neg for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the - operator.
Source§

fn neg(self) -> BigDecimal

Performs the unary - operation. Read more
Source§

impl Nullable for BigDecimal

Source§

fn null() -> Value<'static>

SQL NULL with this type’s encoding.
Source§

impl Num for BigDecimal

Source§

fn from_str_radix( s: &str, radix: u32, ) -> Result<BigDecimal, ParseBigDecimalError>

Creates and initializes a BigDecimal.

Source§

type FromStrRadixErr = ParseBigDecimalError

Source§

impl Numeric for BigDecimal

Source§

type Sum = BigDecimal

The type of the sum: an i64 for integers, an f64 for floats, a Decimal for decimals, and the wrapped type’s sum for a newtype.
Source§

impl One for BigDecimal

Source§

fn one() -> BigDecimal

Returns the multiplicative identity element of Self, 1. Read more
Source§

fn is_one(&self) -> bool

Returns true if self is equal to the multiplicative identity. Read more
Source§

fn set_one(&mut self)

Sets self to the multiplicative identity element of Self, 1.
Source§

impl Ord for BigDecimal

Source§

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

This method returns an Ordering between self and other. Read more
1.21.0 (const: unstable) · Source§

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

Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§

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

Compares and returns the minimum of two values. Read more
1.50.0 (const: unstable) · Source§

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

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

fn clamp_to<R>(self, range: R) -> Self
where Self: Sized, R: ClampBounds<Self>,

🔬This is a nightly-only experimental API. (clamp_to)
Restrict a value to a certain range. Read more
Source§

impl Ordered for BigDecimal

Source§

type Value = BigDecimal

The column’s type, without its Option.
Source§

impl PartialEq for BigDecimal

Source§

fn eq(&self, rhs: &BigDecimal) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl PartialEq<i8> for BigDecimal

Source§

fn eq(&self, rhs: &i8) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl PartialEq<i8> for &BigDecimal

Source§

fn eq(&self, rhs: &i8) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl PartialEq<i16> for BigDecimal

Source§

fn eq(&self, rhs: &i16) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl PartialEq<i16> for &BigDecimal

Source§

fn eq(&self, rhs: &i16) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl PartialEq<i32> for BigDecimal

Source§

fn eq(&self, rhs: &i32) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl PartialEq<i32> for &BigDecimal

Source§

fn eq(&self, rhs: &i32) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl PartialEq<i64> for BigDecimal

Source§

fn eq(&self, rhs: &i64) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl PartialEq<i64> for &BigDecimal

Source§

fn eq(&self, rhs: &i64) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl PartialEq<i128> for BigDecimal

Source§

fn eq(&self, rhs: &i128) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl PartialEq<i128> for &BigDecimal

Source§

fn eq(&self, rhs: &i128) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl PartialEq<u8> for BigDecimal

Source§

fn eq(&self, rhs: &u8) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl PartialEq<u8> for &BigDecimal

Source§

fn eq(&self, rhs: &u8) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl PartialEq<u16> for BigDecimal

Source§

fn eq(&self, rhs: &u16) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl PartialEq<u16> for &BigDecimal

Source§

fn eq(&self, rhs: &u16) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl PartialEq<u32> for BigDecimal

Source§

fn eq(&self, rhs: &u32) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl PartialEq<u32> for &BigDecimal

Source§

fn eq(&self, rhs: &u32) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl PartialEq<u64> for BigDecimal

Source§

fn eq(&self, rhs: &u64) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl PartialEq<u64> for &BigDecimal

Source§

fn eq(&self, rhs: &u64) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl PartialEq<u128> for BigDecimal

Source§

fn eq(&self, rhs: &u128) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl PartialEq<u128> for &BigDecimal

Source§

fn eq(&self, rhs: &u128) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl PartialOrd for BigDecimal

Source§

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

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · 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 (const: unstable) · 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 (const: unstable) · 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 (const: unstable) · Source§

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

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

impl PartialOrd<i8> for BigDecimal

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 (const: unstable) · 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 (const: unstable) · 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 (const: unstable) · 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 (const: unstable) · Source§

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

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

impl PartialOrd<i8> for &BigDecimal

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 (const: unstable) · 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 (const: unstable) · 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 (const: unstable) · 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 (const: unstable) · Source§

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

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

impl PartialOrd<i16> for BigDecimal

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 (const: unstable) · 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 (const: unstable) · 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 (const: unstable) · 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 (const: unstable) · Source§

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

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

impl PartialOrd<i16> for &BigDecimal

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 (const: unstable) · 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 (const: unstable) · 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 (const: unstable) · 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 (const: unstable) · Source§

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

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

impl PartialOrd<i32> for BigDecimal

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 (const: unstable) · 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 (const: unstable) · 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 (const: unstable) · 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 (const: unstable) · Source§

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

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

impl PartialOrd<i32> for &BigDecimal

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 (const: unstable) · 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 (const: unstable) · 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 (const: unstable) · 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 (const: unstable) · Source§

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

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

impl PartialOrd<i64> for BigDecimal

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 (const: unstable) · 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 (const: unstable) · 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 (const: unstable) · 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 (const: unstable) · Source§

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

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

impl PartialOrd<i64> for &BigDecimal

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 (const: unstable) · 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 (const: unstable) · 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 (const: unstable) · 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 (const: unstable) · Source§

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

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

impl PartialOrd<i128> for BigDecimal

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 (const: unstable) · 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 (const: unstable) · 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 (const: unstable) · 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 (const: unstable) · Source§

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

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

impl PartialOrd<i128> for &BigDecimal

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 (const: unstable) · 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 (const: unstable) · 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 (const: unstable) · 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 (const: unstable) · Source§

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

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

impl PartialOrd<u8> for BigDecimal

Source§

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

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · 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 (const: unstable) · 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 (const: unstable) · 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 (const: unstable) · Source§

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

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

impl PartialOrd<u8> for &BigDecimal

Source§

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

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · 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 (const: unstable) · 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 (const: unstable) · 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 (const: unstable) · Source§

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

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

impl PartialOrd<u16> for BigDecimal

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 (const: unstable) · 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 (const: unstable) · 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 (const: unstable) · 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 (const: unstable) · Source§

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

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

impl PartialOrd<u16> for &BigDecimal

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 (const: unstable) · 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 (const: unstable) · 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 (const: unstable) · 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 (const: unstable) · Source§

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

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

impl PartialOrd<u32> for BigDecimal

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 (const: unstable) · 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 (const: unstable) · 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 (const: unstable) · 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 (const: unstable) · Source§

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

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

impl PartialOrd<u32> for &BigDecimal

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 (const: unstable) · 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 (const: unstable) · 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 (const: unstable) · 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 (const: unstable) · Source§

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

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

impl PartialOrd<u64> for BigDecimal

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 (const: unstable) · 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 (const: unstable) · 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 (const: unstable) · 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 (const: unstable) · Source§

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

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

impl PartialOrd<u64> for &BigDecimal

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 (const: unstable) · 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 (const: unstable) · 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 (const: unstable) · 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 (const: unstable) · Source§

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

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

impl PartialOrd<u128> for BigDecimal

Source§

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

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · 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 (const: unstable) · 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 (const: unstable) · 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 (const: unstable) · Source§

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

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

impl PartialOrd<u128> for &BigDecimal

Source§

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

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · 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 (const: unstable) · 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 (const: unstable) · 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 (const: unstable) · 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 PgHasArrayType for BigDecimal

Source§

impl Rem for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the % operator.
Source§

fn rem(self, other: BigDecimal) -> BigDecimal

Performs the % operation. Read more
Source§

impl Rem<&BigDecimal> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the % operator.
Source§

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

Performs the % operation. Read more
Source§

impl Rem<&BigDecimal> for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the % operator.
Source§

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

Performs the % operation. Read more
Source§

impl Rem<BigDecimal> for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the % operator.
Source§

fn rem(self, other: BigDecimal) -> BigDecimal

Performs the % operation. Read more
Source§

impl RemAssign<&BigDecimal> for BigDecimal

Source§

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

Performs the %= operation. Read more
Source§

impl Serialize for BigDecimal

Source§

fn serialize<S>( &self, serializer: S, ) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Signed for BigDecimal

Source§

fn abs(&self) -> BigDecimal

Computes the absolute value. Read more
Source§

fn abs_sub(&self, other: &BigDecimal) -> BigDecimal

The positive difference of two numbers. Read more
Source§

fn signum(&self) -> BigDecimal

Returns the sign of the number. Read more
Source§

fn is_positive(&self) -> bool

Returns true if the number is positive and false if the number is zero or negative.
Source§

fn is_negative(&self) -> bool

Returns true if the number is negative and false if the number is zero or positive.
Source§

impl Sub for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: BigDecimal) -> BigDecimal

Performs the - operation. Read more
Source§

impl Sub<&i8> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &i8) -> BigDecimal

Performs the - operation. Read more
Source§

impl Sub<&i8> for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &i8) -> BigDecimal

Performs the - operation. Read more
Source§

impl Sub<&i16> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &i16) -> BigDecimal

Performs the - operation. Read more
Source§

impl Sub<&i16> for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &i16) -> BigDecimal

Performs the - operation. Read more
Source§

impl Sub<&i32> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &i32) -> BigDecimal

Performs the - operation. Read more
Source§

impl Sub<&i32> for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &i32) -> BigDecimal

Performs the - operation. Read more
Source§

impl Sub<&i64> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &i64) -> BigDecimal

Performs the - operation. Read more
Source§

impl Sub<&i64> for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &i64) -> BigDecimal

Performs the - operation. Read more
Source§

impl Sub<&i128> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &i128) -> BigDecimal

Performs the - operation. Read more
Source§

impl Sub<&i128> for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &i128) -> BigDecimal

Performs the - operation. Read more
Source§

impl Sub<&u8> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &u8) -> BigDecimal

Performs the - operation. Read more
Source§

impl Sub<&u8> for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &u8) -> BigDecimal

Performs the - operation. Read more
Source§

impl Sub<&u16> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &u16) -> BigDecimal

Performs the - operation. Read more
Source§

impl Sub<&u16> for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &u16) -> BigDecimal

Performs the - operation. Read more
Source§

impl Sub<&u32> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &u32) -> BigDecimal

Performs the - operation. Read more
Source§

impl Sub<&u32> for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &u32) -> BigDecimal

Performs the - operation. Read more
Source§

impl Sub<&u64> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &u64) -> BigDecimal

Performs the - operation. Read more
Source§

impl Sub<&u64> for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &u64) -> BigDecimal

Performs the - operation. Read more
Source§

impl Sub<&u128> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &u128) -> BigDecimal

Performs the - operation. Read more
Source§

impl Sub<&u128> for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &u128) -> BigDecimal

Performs the - operation. Read more
Source§

impl Sub<BigDecimal> for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: BigDecimal) -> BigDecimal

Performs the - operation. Read more
Source§

impl Sub<BigInt> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: BigInt) -> BigDecimal

Performs the - operation. Read more
Source§

impl Sub<BigInt> for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: BigInt) -> BigDecimal

Performs the - operation. Read more
Source§

impl<'a, T> Sub<T> for BigDecimal
where T: Into<BigDecimalRef<'a>>,

Source§

type Output = BigDecimal

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: T) -> BigDecimal

Performs the - operation. Read more
Source§

impl<'a, T> Sub<T> for &BigDecimal
where T: Into<BigDecimalRef<'a>>,

Source§

type Output = BigDecimal

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: T) -> BigDecimal

Performs the - operation. Read more
Source§

impl Sub<i8> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: i8) -> BigDecimal

Performs the - operation. Read more
Source§

impl Sub<i8> for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: i8) -> BigDecimal

Performs the - operation. Read more
Source§

impl Sub<i16> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: i16) -> BigDecimal

Performs the - operation. Read more
Source§

impl Sub<i16> for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: i16) -> BigDecimal

Performs the - operation. Read more
Source§

impl Sub<i32> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: i32) -> BigDecimal

Performs the - operation. Read more
Source§

impl Sub<i32> for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: i32) -> BigDecimal

Performs the - operation. Read more
Source§

impl Sub<i64> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: i64) -> BigDecimal

Performs the - operation. Read more
Source§

impl Sub<i64> for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: i64) -> BigDecimal

Performs the - operation. Read more
Source§

impl Sub<i128> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: i128) -> BigDecimal

Performs the - operation. Read more
Source§

impl Sub<i128> for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: i128) -> BigDecimal

Performs the - operation. Read more
Source§

impl Sub<u8> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: u8) -> BigDecimal

Performs the - operation. Read more
Source§

impl Sub<u8> for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: u8) -> BigDecimal

Performs the - operation. Read more
Source§

impl Sub<u16> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: u16) -> BigDecimal

Performs the - operation. Read more
Source§

impl Sub<u16> for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: u16) -> BigDecimal

Performs the - operation. Read more
Source§

impl Sub<u32> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: u32) -> BigDecimal

Performs the - operation. Read more
Source§

impl Sub<u32> for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: u32) -> BigDecimal

Performs the - operation. Read more
Source§

impl Sub<u64> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: u64) -> BigDecimal

Performs the - operation. Read more
Source§

impl Sub<u64> for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: u64) -> BigDecimal

Performs the - operation. Read more
Source§

impl Sub<u128> for BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: u128) -> BigDecimal

Performs the - operation. Read more
Source§

impl Sub<u128> for &BigDecimal

Source§

type Output = BigDecimal

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: u128) -> BigDecimal

Performs the - operation. Read more
Source§

impl SubAssign for BigDecimal

Source§

fn sub_assign(&mut self, rhs: BigDecimal)

Performs the -= operation. Read more
Source§

impl SubAssign<&i8> for BigDecimal

Source§

fn sub_assign(&mut self, rhs: &i8)

Performs the -= operation. Read more
Source§

impl SubAssign<&i16> for BigDecimal

Source§

fn sub_assign(&mut self, rhs: &i16)

Performs the -= operation. Read more
Source§

impl SubAssign<&i32> for BigDecimal

Source§

fn sub_assign(&mut self, rhs: &i32)

Performs the -= operation. Read more
Source§

impl SubAssign<&i64> for BigDecimal

Source§

fn sub_assign(&mut self, rhs: &i64)

Performs the -= operation. Read more
Source§

impl SubAssign<&i128> for BigDecimal

Source§

fn sub_assign(&mut self, rhs: &i128)

Performs the -= operation. Read more
Source§

impl SubAssign<&u8> for BigDecimal

Source§

fn sub_assign(&mut self, rhs: &u8)

Performs the -= operation. Read more
Source§

impl SubAssign<&u16> for BigDecimal

Source§

fn sub_assign(&mut self, rhs: &u16)

Performs the -= operation. Read more
Source§

impl SubAssign<&u32> for BigDecimal

Source§

fn sub_assign(&mut self, rhs: &u32)

Performs the -= operation. Read more
Source§

impl SubAssign<&u64> for BigDecimal

Source§

fn sub_assign(&mut self, rhs: &u64)

Performs the -= operation. Read more
Source§

impl SubAssign<&u128> for BigDecimal

Source§

fn sub_assign(&mut self, rhs: &u128)

Performs the -= operation. Read more
Source§

impl SubAssign<BigInt> for BigDecimal

Source§

fn sub_assign(&mut self, rhs: BigInt)

Performs the -= operation. Read more
Source§

impl<'rhs, T> SubAssign<T> for BigDecimal
where T: Into<BigDecimalRef<'rhs>>,

Source§

fn sub_assign(&mut self, rhs: T)

Performs the -= operation. Read more
Source§

impl SubAssign<i8> for BigDecimal

Source§

fn sub_assign(&mut self, rhs: i8)

Performs the -= operation. Read more
Source§

impl SubAssign<i16> for BigDecimal

Source§

fn sub_assign(&mut self, rhs: i16)

Performs the -= operation. Read more
Source§

impl SubAssign<i32> for BigDecimal

Source§

fn sub_assign(&mut self, rhs: i32)

Performs the -= operation. Read more
Source§

impl SubAssign<i64> for BigDecimal

Source§

fn sub_assign(&mut self, rhs: i64)

Performs the -= operation. Read more
Source§

impl SubAssign<i128> for BigDecimal

Source§

fn sub_assign(&mut self, rhs: i128)

Performs the -= operation. Read more
Source§

impl SubAssign<u8> for BigDecimal

Source§

fn sub_assign(&mut self, rhs: u8)

Performs the -= operation. Read more
Source§

impl SubAssign<u16> for BigDecimal

Source§

fn sub_assign(&mut self, rhs: u16)

Performs the -= operation. Read more
Source§

impl SubAssign<u32> for BigDecimal

Source§

fn sub_assign(&mut self, rhs: u32)

Performs the -= operation. Read more
Source§

impl SubAssign<u64> for BigDecimal

Source§

fn sub_assign(&mut self, rhs: u64)

Performs the -= operation. Read more
Source§

impl SubAssign<u128> for BigDecimal

Source§

fn sub_assign(&mut self, rhs: u128)

Performs the -= operation. Read more
Source§

impl Sum for BigDecimal

Source§

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

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

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

Source§

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

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

impl ToBigInt for BigDecimal

Source§

fn to_bigint(&self) -> Option<BigInt>

Converts the value of self to a BigInt.
Source§

impl ToPrimitive for BigDecimal

Source§

fn to_i64(&self) -> Option<i64>

Converts the value of self to an i64. If the value cannot be represented by an i64, then None is returned.
Source§

fn to_i128(&self) -> Option<i128>

Converts the value of self to an i128. If the value cannot be represented by an i128 (i64 under the default implementation), then None is returned. Read more
Source§

fn to_u64(&self) -> Option<u64>

Converts the value of self to a u64. If the value cannot be represented by a u64, then None is returned.
Source§

fn to_u128(&self) -> Option<u128>

Converts the value of self to a u128. If the value cannot be represented by a u128 (u64 under the default implementation), then None is returned. Read more
Source§

fn to_f64(&self) -> Option<f64>

Converts the value of self to an f64. Overflows may map to positive or negative inifinity, otherwise None is returned if the value cannot be represented by an f64. Read more
Source§

fn to_isize(&self) -> Option<isize>

Converts the value of self to an isize. If the value cannot be represented by an isize, then None is returned.
Source§

fn to_i8(&self) -> Option<i8>

Converts the value of self to an i8. If the value cannot be represented by an i8, then None is returned.
Source§

fn to_i16(&self) -> Option<i16>

Converts the value of self to an i16. If the value cannot be represented by an i16, then None is returned.
Source§

fn to_i32(&self) -> Option<i32>

Converts the value of self to an i32. If the value cannot be represented by an i32, then None is returned.
Source§

fn to_usize(&self) -> Option<usize>

Converts the value of self to a usize. If the value cannot be represented by a usize, then None is returned.
Source§

fn to_u8(&self) -> Option<u8>

Converts the value of self to a u8. If the value cannot be represented by a u8, then None is returned.
Source§

fn to_u16(&self) -> Option<u16>

Converts the value of self to a u16. If the value cannot be represented by a u16, then None is returned.
Source§

fn to_u32(&self) -> Option<u32>

Converts the value of self to a u32. If the value cannot be represented by a u32, then None is returned.
Source§

fn to_f32(&self) -> Option<f32>

Converts the value of self to an f32. Overflows may map to positive or negative inifinity, otherwise None is returned if the value cannot be represented by an f32.
Source§

impl TryFrom<&PgNumeric> for BigDecimal

Source§

type Error = Box<dyn Error + Sync + Send>

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

fn try_from( numeric: &PgNumeric, ) -> Result<BigDecimal, <BigDecimal as TryFrom<&PgNumeric>>::Error>

Performs the conversion.
Source§

impl TryFrom<PgNumeric> for BigDecimal

Source§

type Error = Box<dyn Error + Sync + Send>

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

fn try_from( numeric: PgNumeric, ) -> Result<BigDecimal, Box<dyn Error + Sync + Send>>

Performs the conversion.
Source§

impl TryFrom<f32> for BigDecimal

Source§

type Error = ParseBigDecimalError

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

fn try_from(n: f32) -> Result<BigDecimal, <BigDecimal as TryFrom<f32>>::Error>

Performs the conversion.
Source§

impl TryFrom<f64> for BigDecimal

Source§

type Error = ParseBigDecimalError

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

fn try_from(n: f64) -> Result<BigDecimal, <BigDecimal as TryFrom<f64>>::Error>

Performs the conversion.
Source§

impl Type<MySql> for BigDecimal

Source§

fn type_info() -> MySqlTypeInfo

Returns the canonical SQL type for this Rust type. Read more
Source§

fn compatible(ty: &MySqlTypeInfo) -> bool

Determines if this Rust type is compatible with the given SQL type. Read more
Source§

impl Type<Postgres> for BigDecimal

Source§

fn type_info() -> PgTypeInfo

Returns the canonical SQL type for this Rust type. Read more
Source§

fn compatible(ty: &<DB as Database>::TypeInfo) -> bool

Determines if this Rust type is compatible with the given SQL type. Read more
Source§

impl UpperExp for BigDecimal

Source§

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

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

impl Zero for BigDecimal

Source§

fn zero() -> BigDecimal

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.

Auto Trait Implementations§

§

impl Forget for BigDecimal

§

impl Freeze for BigDecimal
where *const u8 is !null: Freeze, PhantomData<u64>: Freeze,

§

impl Move for BigDecimal

§

impl RefUnwindSafe for BigDecimal

§

impl Send for BigDecimal
where RawVecInner: Send,

§

impl Sync for BigDecimal
where RawVecInner: Sync,

§

impl Unpin for BigDecimal
where *const u8 is !null: Unpin,

§

impl UnsafeUnpin for BigDecimal

§

impl UnwindSafe for BigDecimal
where RawVecInner: UnwindSafe,

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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<Q, K> Comparable<K> for Q
where Q: Ord + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
Source§

impl<T> ComparableTo<Option<T>> for T
where T: IntoExpr + Clone + Decode,

Source§

fn __typed(&self) -> Option<Option<T>>

Source§

impl<T> ComparableTo<T> for T
where T: IntoExpr + Clone + Decode,

Source§

fn __typed(&self) -> Option<T>

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> Fake for T

Source§

fn fake<U>(&self) -> U
where Self: FakeBase<U>,

Source§

fn fake_with_rng<U, R>(&self, rng: &mut R) -> U
where R: RngExt + ?Sized, Self: FakeBase<U>,

Source§

impl<T> FillValue<Option<T>> for T
where T: Send + 'static,

Source§

async fn fill(self) -> Result<Option<T>, Error>

Resolves the column’s value. Read more
Source§

impl<T> FillValue<T> for T
where T: Send + 'static,

Source§

async fn fill(self) -> Result<T, Error>

Resolves the column’s value. Read more
Source§

impl<K> ForeignKey<K> for K

Source§

fn key(&self) -> Option<&K>

Returns the key, or None when the field holds no key.
Source§

fn __from_key(key: K) -> K

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<I> FromRadix10 for I
where I: Zero + One + AddAssign + MulAssign,

Source§

fn from_radix_10(text: &[u8]) -> (I, usize)

Parses an integer from a slice. Read more
Source§

impl<I> FromRadix16 for I
where I: Zero + One + AddAssign + MulAssign,

Source§

fn from_radix_16(text: &[u8]) -> (I, usize)

Parses an integer from a slice. Read more
Source§

impl<I> FromRadix10Signed for I

Source§

fn from_radix_10_signed(text: &[u8]) -> (I, usize)

Parses an integer from a slice. Read more
Source§

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

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Source§

impl<T> FromRow for T
where T: Decode,

Source§

fn from_row(row: &AnyRow) -> Result<T, Error>

Build the value from row. Read more
Source§

impl<T> FutureExt for T

Source§

fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ

Attaches the provided Context to this type, returning a WithContext wrapper. Read more
Source§

fn with_current_context(self) -> WithContext<Self> ⓘ

Attaches the current Context to this type, returning a WithContext wrapper. Read more
Source§

impl<T, Rhs, Output> GroupOps<Rhs, Output> for T
where T: Add<Rhs, Output = Output> + Sub<Rhs, Output = Output> + AddAssign<Rhs> + SubAssign<Rhs>,

Source§

impl<T, Rhs, Output> GroupOpsOwned<Rhs, Output> for T
where T: for<'r> GroupOps<&'r Rhs, Output>,

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<'a, T> IntoExpr for T
where T: Into<Value<'a>>,

Source§

fn into_expr(self) -> Expr

Convert the value into an expression.
Source§

impl<T> IntoJoinValue<Option<T>> for T
where T: IntoExpr,

Source§

fn __value(self) -> Expr

Source§

impl<T> IntoJoinValue<T> for T
where T: IntoExpr,

Source§

fn __value(self) -> Expr

Source§

impl<T> IntoMarkdown for T
where T: Display,

Source§

fn into_markdown(self) -> Markdown

The value as Slack markdown.
Source§

fn __format(self, format: impl FnOnce(&dyn Display) -> String) -> Markdown

Source§

impl<T> IntoProp for T
where T: Serialize,

Source§

fn into_prop(self) -> Prop

Convert the value into a prop.
Source§

impl<T> IntoProps for T
where T: Serialize,

Source§

fn into_props(self) -> Result<Props, PropError>

Convert the value into props. Read more
Source§

impl<Unshared, Shared> IntoShared<Shared> for Unshared
where Shared: FromUnshared<Unshared>,

Source§

fn into_shared(self) -> Shared

Creates a shared type from an unshared type.
Source§

impl<T> IntoViewData for T
where T: Serialize,

Source§

fn into_view_data(self) -> ViewData

Converts the value into view data.
Source§

impl<T> Loaded<Plain> for T
where T: Serialize,

Source§

impl<T, N> NotifiedBy<T> for N
where T: Notification<N>,

Source§

fn __routes(&self) -> Vec<Route>

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> NumRef for T
where T: Num + for<'r> NumOps<&'r T>,

Source§

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

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T, Base> RefNum<Base> for T
where T: NumOps<Base, Base> + for<'r> NumOps<&'r Base, Base>,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, Rhs, Output> ScalarMul<Rhs, Output> for T
where T: Mul<Rhs, Output = Output> + MulAssign<Rhs>,

Source§

impl<T, Rhs, Output> ScalarMulOwned<Rhs, Output> for T
where T: for<'r> ScalarMul<&'r Rhs, Output>,

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 = !

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

fn try_from(value: U) -> Result<T, !>

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, V> UpdateValue<T> for V
where V: FillValue<T>,

Source§

fn __update<M, U>(self, column: Column<M, T>, update: U) -> U
where M: Model, U: Updates<M>, T: IntoExpr + Clone + Send + Sync + 'static,

Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more