Crates.io | codes-iso-17442 |
lib.rs | codes-iso-17442 |
version | 0.1.3 |
source | src |
created_at | 2022-12-07 00:43:15.601865 |
updated_at | 2022-12-25 02:52:24.070501 |
description | This package contains an implementation of the ISO 17442 Legal Entity Identifier (LEI) specification. |
homepage | |
repository | https://github.com/johnstonskj/rust-codes |
max_upload_size | |
id | 731494 |
size | 15,471 |
This package contains an implementation of the ISO 17442 Legal Entity Identifier (LEI) specification.
The Legal Entity Identifier (LEI) is a unique global identifier for legal entities participating in financial transactions. Also known as an LEI code or LEI number, its purpose is to help identify legal entities on a globally accessible database. Legal entities are organisations such as companies or government entities that participate in financial transactions. The identifier is used in regulatory reporting to financial regulators and all financial companies and funds are required to have an LEI.
The ISO Specification defines a format for describing identifiers and including check digits to ensure validity. In turn The Global Legal Entity Identifier Foundation (GLEIF) is the top-level maintainer of the global registry of identifiers and as such has further refined the LEI format to contain the following components:
GLIEF also provides daily download files for all registered identifiers, and an LEI search API.
For notes on the design of the API, see the repository README.
use codes_iso_17442::LegalEntityId;
use std::str::FromStr;
let lei = LegalEntityId::from_str("YZ83GD8L7GG84979J516").unwrap();
assert_eq!(lei.local_operating_unit(), "YZ83");
assert_eq!(lei.entity(), "GD8L7GG84979J5");
assert_eq!(lei.check_digits(), "16");
By default only the serde
feature is enabled.
serde
- Enables serialization of the LegalEntityId
type.url
- Enables the conversion between LEI and URL (URN) forms.Version 0.1.3
build
module in codes-commonVersion 0.1.2
Standardized
and FixedLengthCode
traits.Version 0.1.0
TBD