Struct bitcoin::util::decimal::Decimal[][src]

pub struct Decimal { /* fields omitted */ }

A fixed-point decimal type

Methods

impl Decimal
[src]

Creates a new Decimal

Returns the mantissa

Returns the exponent

Get the decimal's value in an integer type, by multiplying by some power of ten to ensure the returned value is 10 ** exponent types the actual value.

Returns whether or not the number is nonnegative

Trait Implementations

impl Copy for Decimal
[src]

impl Clone for Decimal
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Decimal
[src]

Formats the value using the given formatter. Read more

impl Eq for Decimal
[src]

impl Ord for Decimal
[src]

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

impl PartialEq<Decimal> for Decimal
[src]

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

This method tests for !=.

impl PartialOrd<Decimal> for Decimal
[src]

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

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

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

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

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

impl Display for Decimal
[src]

Formats the value using the given formatter. Read more

impl Add for Decimal
[src]

The resulting type after applying the + operator.

Performs the + operation.

impl Neg for Decimal
[src]

The resulting type after applying the - operator.

Performs the unary - operation.

impl Sub for Decimal
[src]

The resulting type after applying the - operator.

Performs the - operation.

Auto Trait Implementations

impl Send for Decimal

impl Sync for Decimal