Skip to main content

Crate pretty_decimal

Crate pretty_decimal 

Source
Expand description

A Decimal with pretty printing.

Library provides comma separated decimal.

let x = PrettyDecimal::comma3dot(dec!(-1234567.890));
assert_eq!(x.to_string(), "-1,234,567.890");
let x: PrettyDecimal = "-1,234,567.890".parse().unwrap();
assert_eq!(x.value, dec!(-1234567.890));

Structs§

PrettyDecimal
Decimal with the pretty printing format information.

Enums§

Format
Decimal formatting type for pretty-printing.
ParseError
Error occured during parsing.