rust_decimal_ext

rust_decimal_ext
is an extension library that adds more operator trait support to rust_decimal. With this library, you can conveniently perform a variety of arithmetic operations, such as addition, subtraction, multiplication, and division, on Decimal
types. It also supports automatic conversion and operations with numbers, strings, and other types.
Usage
use *;
let mut a: Decimal = from + 1;
let mut b = from + 2.5;
let mut c = from + "5.5";
a += 1;
b += 2.5;
c += "5.5";
assert!;
assert!;
assert!;
assert!;
assert!;
assert!;
assert!;
a.partial_cmp.unwrap;
a.partial_cmp.unwrap;
a.partial_cmp.unwrap;
// painc
_ = from + f64NAN;
_ = from + f64INFINITY;
_ = from + f64NEG_INFINITY;