pub struct LeiRule;Expand description
Validates a value as an ISO 17442 Legal Entity Identifier (LEI).
§Examples
use mx20022_validate::rules::lei::LeiRule;
use mx20022_validate::rules::Rule;
let rule = LeiRule;
// Valid LEI (verified public registration, mod-97 == 1)
let errors = rule.validate("7ZW8QJWVPR4P1S5PX088", "/path");
assert!(errors.is_empty(), "Valid LEI should produce no errors");
let errors = rule.validate("TOOSHORT", "/path");
assert!(!errors.is_empty(), "Wrong-length LEI should produce errors");Trait Implementations§
Auto Trait Implementations§
impl Freeze for LeiRule
impl RefUnwindSafe for LeiRule
impl Send for LeiRule
impl Sync for LeiRule
impl Unpin for LeiRule
impl UnsafeUnpin for LeiRule
impl UnwindSafe for LeiRule
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more