//! Typed credential parsing structs.
//!
//! This module provides type-specific structs for each credential type,
//! enabling compile-time safe access to credential fields without JSON parsing.
//!
//! # Overview
//!
//! Each parsed struct corresponds to a `LastID` credential type and implements
//! `TryFrom<&VerifiedCredential>`, allowing type-safe conversion from the
//! generic `VerifiedCredential` type.
//!
//! # Available Parsed Types
//!
//! | Struct | Credential Type |
//! |--------|-----------------|
//! | [`ParsedPersona`] | `LastID.Persona` |
//! | [`ParsedEmployment`] | `LastID.Employment` |
//! | [`ParsedVerifiedEmail`] | `LastID.VerifiedEmail` |
//! | [`ParsedVerifiedPhone`] | `LastID.VerifiedPhone` |
//! | [`ParsedVerifiedPersona`] | `LastID.VerifiedPersona` |
//! | [`ParsedAgeProof`] | `LastID.AgeProof` |
//!
//! # Example
//!
//! ```rust,ignore
//! use lastid_sdk::types::parsed::ParsedPersona;
//!
//! // After receiving a verified credential...
//! let credential: VerifiedCredential = /* from verification */;
//!
//! // Parse into typed struct
//! let persona = ParsedPersona::try_from(&credential)?;
//!
//! // Access fields with type safety
//! if let Some(name) = &persona.display_name {
//!     println!("Name: {}", name);
//! }
//! ```
//!
//! # Error Handling
//!
//! All `TryFrom` implementations return `Result<Self, LastIDError>`:
//!
//! - **Type mismatch**: If the credential type doesn't match (e.g., parsing a
//!   Persona credential as Employment), returns `CredentialParse` error.
//! - **Missing required field**: For parsed types with required fields (e.g.,
//!   `ParsedVerifiedEmail.email`), returns error if the field is missing.

mod age_proof;
mod employment;
mod persona;
mod verified_email;
mod verified_persona;
mod verified_phone;

pub use age_proof::ParsedAgeProof;
pub use employment::ParsedEmployment;
pub use persona::ParsedPersona;
pub use verified_email::ParsedVerifiedEmail;
pub use verified_persona::ParsedVerifiedPersona;
pub use verified_phone::ParsedVerifiedPhone;
