Module rust_decimal::prelude
source · Expand description
A convenience module appropriate for glob imports (use rust_decimal::prelude::*;
).
Structs
Decimal
represents a 128 bit representation of a fixed-precision decimal number.
The finite set of values of type Decimal
are of the form m / 10e,
where m is an integer such that -296 < m < 296, and e is an integer
between 0 and 28 inclusive.Enums
RoundingStrategy
represents the different rounding strategies that can be used by
round_dp_with_strategy
.Traits
A generic trait for converting a number to a value.
Parse a value from a string
Trait exposing various mathematical operations that can be applied using a Decimal. This is only
present when the
maths
feature has been enabled.Defines a multiplicative identity element for
Self
.Useful functions for signed numbers (i.e. numbers that can be negative).
A generic trait for converting a value to a number.
Defines an additive identity element for
Self
.