Crates.io | steel-cent |
lib.rs | steel-cent |
version | 0.2.3 |
source | src |
created_at | 2016-09-28 22:39:15.366257 |
updated_at | 2019-07-12 03:37:35.280087 |
description | currency and money value types |
homepage | http://duelinmarkers.gitlab.io/steel-cent/ |
repository | https://gitlab.com/duelinmarkers/steel-cent |
max_upload_size | |
id | 6657 |
size | 123,697 |
See examples, docs, etc. at duelinmarkers.gitlab.io/steel-cent or just browse the rustdocs in the source.
Two value types for monetary amounts: Money
and SmallMoney
A value type for currencies: Currency
Customizable output formatting and input parsing of money values
Currency lookup by ISO 4217 alpha (e.g., "USD") or numeric (e.g, 840) codes
Should checked_{add,sub} return None on mismatched currency instead of panicking?
Look up currency by country code
Support omitting zero minor part in FormatSpec
Accept Into
Support for adding custom currencies to lookup table
Include pseudo-currencies w/o decimal places (not sure how that should work)
Include historical currencies (maybe)
Include non-standard (crypto-)currencies (maybe)
BigMoney (not limited to minor-unit precision) backed by BigInt
Is there a better way to do pre-defined FormatSpecs?
meta: Unify README w/ site/index.html
meta: Customize rustdocs
The design of steel-cent is largely inspired by the excellent Joda Money Java library. It also uses Joda Money's currency data.
steel-cent is Copyright 2016 John D. Hume.
Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall have its copyright assigned to John D. Hume and be dual licensed as above, keeping it free for you and anyone else to use, without any additional terms or conditions.