MrzScanResult

sealed interface MrzScanResult

The outcome of analysing one frame.

Decoded and NoMrzFound hold document data and raw OCR text, so logging a whole result leaks it: log only non-PII fields such as quality, or redact first. toString() on each variant shows no document values; they are in the properties.

Since

0.2.0

Inheritors

Types

Link copied to clipboard
data class CaptureError(val error: CameraError, val quality: ScanQuality) : MrzScanResult

The capture step failed (see CameraError); there is no recognized text.

Link copied to clipboard
data class Decoded(val parse: ParseResult, val recognizedText: RecognizedText, val quality: ScanQuality, val fillerPadding: MrzFillerPadding?) : MrzScanResult

An MRZ-shaped candidate was located and parsed.

Link copied to clipboard
data class NoMrzFound(val recognizedText: RecognizedText, val quality: ScanQuality) : MrzScanResult

OCR ran and found no MRZ-shaped candidate.

Properties

Link copied to clipboard
abstract val quality: ScanQuality

The quality signals observed for this frame. Informational only.