lei provides an
LEI type for working with validated Legal Entity Identifiers (LEIs) as
defined in ISO 17442-1:2020 “Financial services
— Legal entity identifier (LEI) — Part 1: Assignment” (“The Standard”).
An LEI is comprised of 20 ASCII characters with the following parts, in order:
- A four-character uppercase alphanumeric LOU Identifier corresponding to the Local Operating Unit that issued the LEI, according to the GLEIF web site.
- A 14-character uppercase alphanumeric Entity Identifier assigned by the corresponding LOU.
- Two decimal digits representing the Check Digit Pair computed using a method based on the ISO/IEC 7064, MOD 97-10 Check Character System.
parse_loose() methods on the LEI type to convert a string to a validated
This crate is part of the Financial Identifiers series:
- CUSIP: Committee on Uniform Security Identification Procedures (ANSI X9.6-2020)
- ISIN: International Securities Identification Number (ISO 6166:2021)
- LEI: Legal Entity Identifier (ISO 17442:2020)
The referenced ISO/IEC 7064, MOD 97-10 Check Character System is implemented in:
- ISO/IEC 7064: Check character systems (ISO/IEC 7064:2003)
pub use error::LEIError;
- An LEI in confirmed valid format.
- Build an LEI from its parts: an LOU ID and an Entity ID. The Check Digits are automatically computed.
- Build an LEI from a Payload (an already-concatenated LOU ID and Entity ID). The Check Digits are automatically computed.
- Parse a string to a valid LEI or an error message, requiring the string to already be only uppercase alphanumerics with no leading or trailing whitespace in addition to being the right length and format.
- Parse a string to a valid LEI or an error, allowing the string to contain leading or trailing whitespace and/or lowercase letters as long as it is otherwise the right length and format.
- Test whether or not the passed string is in valid LEI format, without producing an LEI struct value.