iso-4217

Crates.ioiso-4217
lib.rsiso-4217
version0.1.0
sourcesrc
created_at2020-03-03 16:40:12.176175
updated_at2020-03-03 16:40:12.176175
descriptionCurrency code based on ISO-4217
homepage
repositoryhttps://github.com/mechiru/iso-4217
max_upload_size
id215005
size37,792
(mechiru)

documentation

https://docs.rs/iso-4217

README

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.

Commit count: 3

cargo fmt