DecodeResult

Struct DecodeResult 

Source
pub struct DecodeResult {
    pub claim169: Claim169,
    pub cwt_meta: CwtMeta,
    pub verification_status: VerificationStatus,
    pub warnings: Vec<Warning>,
}
Expand description

Result of successfully decoding a Claim 169 QR code.

This struct contains all the data extracted from the QR code:

  • The identity data (Claim169)
  • CWT metadata like issuer and expiration (CwtMeta)
  • The signature verification status
  • Any warnings generated during decoding

§Example

let result = Decoder::new(qr_content)
    .verify_with_ed25519(&public_key)?
    .decode()?;

// Access identity data
if let Some(name) = &result.claim169.full_name {
    println!("Welcome, {}!", name);
}

// Check verification status
match result.verification_status {
    VerificationStatus::Verified => println!("Signature verified"),
    VerificationStatus::Skipped => println!("Verification skipped"),
    VerificationStatus::Failed => println!("Verification failed"),
}

// Check for warnings
for warning in &result.warnings {
    println!("Warning: {}", warning.message);
}

Fields§

§claim169: Claim169

The extracted Claim 169 identity data.

Contains demographic information (name, date of birth, address, etc.) and optionally biometric data (fingerprints, iris scans, face images).

§cwt_meta: CwtMeta

CWT (CBOR Web Token) metadata.

Contains standard claims like issuer, subject, expiration time, and issued-at timestamp.

§verification_status: VerificationStatus

Signature verification status.

  • Verified: Signature was checked and is valid
  • Skipped: No verifier was provided (only if allow_unverified was set)
  • Failed: Signature verification failed (this typically returns an error instead)
§warnings: Vec<Warning>

Warnings generated during decoding.

Non-fatal issues that don’t prevent decoding but may warrant attention, such as unknown fields (forward compatibility) or skipped validations.

Trait Implementations§

Source§

impl Debug for DecodeResult

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V