This package provides a common code representing standards agencies.
The two core types, [Agency] and [Standard] work together to provide reporting capabilities to other codes project packages. Specifically a package that provides types corresponding to a standard definition can have an instance of the [Standard] struct that describes the standard. This in turn references the [Agency] that controls the standard.
Consider the following example from the ISO 4217 package.
```rust use codes_agency::{Agency, Standard};
// Taken from codesiso4217 pub const ISO4217: Standard = Standard::newwithlongref( Agency::ISO, "4217", "ISO 4217:2015", "Currency codes", "https://www.iso.org/iso-4217-currency-codes.html", );
asserteq!(ISO4217.agency().tostring(), String::from("ISO")); asserteq!(ISO4217.shortref(), "4217"); asserteq!(ISO4217.longref(), Some(&"ISO 4217:2015")); asserteq!(ISO4217.title(), "Currency codes"); asserteq!(ISO_4217.url(), "https://www.iso.org/iso-4217-currency-codes.html"); ```
For notes on the design of the API, see the repository README.
By default only the serde
feature is enabled.
serde
- Enables serialization of the Agency
type.Version 0.1.8
Standardized
trait.Version 0.1.7
Version 0.1.6
Version 0.1.5
ALL_CODES
constant.Version 0.1.4
codes-common
Code
trait and macro-created implementation.Version 0.1.3
Agency
variants.Error
to be inline with other package naming conventions.Version 0.1.2
Code
.Version 0.1.1
Version 0.1.0
parent_agency
method (ITU is a part of UN)