#iso #iso4217 #currency #code

iso-4217

Currency code based on ISO-4217

1 unstable release

0.1.0 Mar 3, 2020

#134 in Finance

Download history 444/week @ 2023-06-11 341/week @ 2023-06-18 339/week @ 2023-06-25 310/week @ 2023-07-02 838/week @ 2023-07-09 283/week @ 2023-07-16 248/week @ 2023-07-23 257/week @ 2023-07-30 311/week @ 2023-08-06 309/week @ 2023-08-13 280/week @ 2023-08-20 319/week @ 2023-08-27 268/week @ 2023-09-03 197/week @ 2023-09-10 279/week @ 2023-09-17 266/week @ 2023-09-24

1,037 downloads per month
Used in 6 crates (2 directly)

MIT/Apache

21KB
301 lines

iso-4217

CI Rust Documentation Latest Version

This library provides enumeration of ISO-4217.

[dependencies]
iso-4217 = "0.1"

Example

use std::convert::TryFrom;
use iso_4217::*;

let usd: CurrencyCode = TryFrom::try_from("USD").unwrap();
assert_eq!(usd, CurrencyCode::USD);

assert_eq!(usd.alpha(), "USD");
assert_eq!(usd.num(), 840);
assert_eq!(usd.digit(), Some(2));
assert_eq!(usd.name(), "United States dollar");

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.


lib.rs:

This library provides enumeration of ISO-4217.

Example

use std::convert::TryFrom;
use iso_4217::*;

let usd: CurrencyCode = TryFrom::try_from("USD").unwrap();
assert_eq!(usd, CurrencyCode::USD);

assert_eq!(usd.alpha(), "USD");
assert_eq!(usd.num(), 840);
assert_eq!(usd.digit(), Some(2));
assert_eq!(usd.name(), "United States dollar");

No runtime deps