Struct bigdecimal::BigDecimal [] [src]

pub struct BigDecimal { /* fields omitted */ }

A big decimal type.

Methods

impl BigDecimal
[src]

Creates and initializes a BigDecimal.

Creates and initializes a BigDecimal.

Examples

// assert_eq!(BigDecimal::parse_bytes(b"0", 16), BigDecimal::zero());
// assert_eq!(BigDecimal::parse_bytes(b"f", 16), BigDecimal::parse_bytes(b"16", 10));

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, digits will be dropped.

Trait Implementations

impl Clone for BigDecimal
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for BigDecimal
[src]

Formats the value using the given formatter.

impl Hash for BigDecimal
[src]

Feeds this value into the state given, updating the hasher as necessary.

Feeds a slice of this type into the state provided.

impl FromStr for BigDecimal
[src]

The associated error which can be returned from parsing.

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

impl PartialEq for BigDecimal
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Default for BigDecimal
[src]

Returns the "default value" for a type. Read more

impl Zero for BigDecimal
[src]

Returns the additive identity element of Self, 0. Read more

Returns true if self is equal to the additive identity.

impl One for BigDecimal
[src]

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

impl Add<BigDecimal> for BigDecimal
[src]

The resulting type after applying the + operator

The method for the + operator

impl<'a> Add<&'a BigDecimal> for BigDecimal
[src]

The resulting type after applying the + operator

The method for the + operator

impl<'a> Add<BigDecimal> for &'a BigDecimal
[src]

The resulting type after applying the + operator

The method for the + operator

impl<'a, 'b> Add<&'b BigDecimal> for &'a BigDecimal
[src]

The resulting type after applying the + operator

The method for the + operator

impl Sub<BigDecimal> for BigDecimal
[src]

The resulting type after applying the - operator

The method for the - operator

impl<'a> Sub<&'a BigDecimal> for BigDecimal
[src]

The resulting type after applying the - operator

The method for the - operator

impl<'a> Sub<BigDecimal> for &'a BigDecimal
[src]

The resulting type after applying the - operator

The method for the - operator

impl<'a, 'b> Sub<&'b BigDecimal> for &'a BigDecimal
[src]

The resulting type after applying the - operator

The method for the - operator

impl Mul<BigDecimal> for BigDecimal
[src]

The resulting type after applying the * operator

The method for the * operator

impl<'a> Mul<&'a BigDecimal> for BigDecimal
[src]

The resulting type after applying the * operator

The method for the * operator

impl<'a> Mul<BigDecimal> for &'a BigDecimal
[src]

The resulting type after applying the * operator

The method for the * operator

impl<'a, 'b> Mul<&'b BigDecimal> for &'a BigDecimal
[src]

The resulting type after applying the * operator

The method for the * operator

impl Div<BigDecimal> for BigDecimal
[src]

The resulting type after applying the / operator

The method for the / operator

impl<'a> Div<&'a BigDecimal> for BigDecimal
[src]

The resulting type after applying the / operator

The method for the / operator

impl<'a> Div<BigDecimal> for &'a BigDecimal
[src]

The resulting type after applying the / operator

The method for the / operator

impl<'a, 'b> Div<&'b BigDecimal> for &'a BigDecimal
[src]

The resulting type after applying the / operator

The method for the / operator

impl Rem<BigDecimal> for BigDecimal
[src]

The resulting type after applying the % operator

The method for the % operator

impl<'a> Rem<&'a BigDecimal> for BigDecimal
[src]

The resulting type after applying the % operator

The method for the % operator

impl<'a> Rem<BigDecimal> for &'a BigDecimal
[src]

The resulting type after applying the % operator

The method for the % operator

impl<'a, 'b> Rem<&'b BigDecimal> for &'a BigDecimal
[src]

The resulting type after applying the % operator

The method for the % operator

impl Display for BigDecimal
[src]

Formats the value using the given formatter. Read more

impl Num for BigDecimal
[src]

Creates and initializes a BigDecimal.