ParseResult

sealed class ParseResult

The result of parsing an MRZ: Success, PartialSuccess, or Failure.

Success and PartialSuccess hold the personal data of the document, and Failure holds the raw input. toString() on each of them shows no document values; they are in the properties.

Since

0.1.0

Inheritors

Types

Link copied to clipboard
data class Failure(val error: MrzParseError, val rawInput: String?, val metadata: ResultMetadata) : ParseResult

The input could not be parsed.

Link copied to clipboard
data class PartialSuccess(val document: MrzDocument, val metadata: ResultMetadata) : ParseResult

The input parsed, and the validator found at least one validation failure.

Link copied to clipboard
data class Success(val document: MrzDocument, val metadata: ResultMetadata) : ParseResult

The input parsed and the validator found no validation failure.

Properties

Link copied to clipboard
abstract val metadata: ResultMetadata

The reading method, warnings, and validation failures of this result.