pub struct MRZResult {
pub document_type: String,
pub country_code: String,
pub surnames: String,
pub given_names: String,
pub document_number: String,
pub nationality_country_code: String,
pub birth_date: NaiveDate,
pub sex: Sex,
pub expiry_date: NaiveDate,
pub personal_number: String,
pub personal_number2: Option<String>,
}Expand description
Parsed contents of an MRZ (Machine Readable Zone) — the values typically extracted from passport / ID MRZ lines.
Fields§
§document_type: String§country_code: String§surnames: String§given_names: String§document_number: String§nationality_country_code: String§birth_date: NaiveDate§sex: Sex§expiry_date: NaiveDate§personal_number: String§personal_number2: Option<String>Implementations§
Source§impl MRZResult
impl MRZResult
Sourcepub fn new(
document_type: impl Into<String>,
country_code: impl Into<String>,
surnames: impl Into<String>,
given_names: impl Into<String>,
document_number: impl Into<String>,
nationality_country_code: impl Into<String>,
birth_date: NaiveDate,
sex: Sex,
expiry_date: NaiveDate,
personal_number: impl Into<String>,
personal_number2: Option<impl Into<String>>,
) -> Self
pub fn new( document_type: impl Into<String>, country_code: impl Into<String>, surnames: impl Into<String>, given_names: impl Into<String>, document_number: impl Into<String>, nationality_country_code: impl Into<String>, birth_date: NaiveDate, sex: Sex, expiry_date: NaiveDate, personal_number: impl Into<String>, personal_number2: Option<impl Into<String>>, ) -> Self
Create a new MRZResult.
birth_date and expiry_date are NaiveDate — date-only values are
all MRZ carries for these fields.
Trait Implementations§
impl Eq for MRZResult
impl StructuralPartialEq for MRZResult
Auto Trait Implementations§
impl Freeze for MRZResult
impl RefUnwindSafe for MRZResult
impl Send for MRZResult
impl Sync for MRZResult
impl Unpin for MRZResult
impl UnsafeUnpin for MRZResult
impl UnwindSafe for MRZResult
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