#iso #currency #code

iso-4217

Currency code based on ISO-4217

1 unstable release

0.1.0 Mar 3, 2020

#177 in Finance

Download history 262/week @ 2023-12-07 247/week @ 2023-12-14 259/week @ 2023-12-21 199/week @ 2023-12-28 231/week @ 2024-01-04 354/week @ 2024-01-11 307/week @ 2024-01-18 258/week @ 2024-01-25 277/week @ 2024-02-01 278/week @ 2024-02-08 270/week @ 2024-02-15 329/week @ 2024-02-22 318/week @ 2024-02-29 345/week @ 2024-03-07 291/week @ 2024-03-14 213/week @ 2024-03-21

1,214 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