///|
/// Supplies a caller-owned identity, input, and parsing policy.
pub(all) struct RomanBatchItem {
id : String
input : String
config : ParseConfig
} derive(Eq, Debug)
///|
/// Groups parser errors into stable statistics categories.
pub(all) enum BatchFailureKind {
EmptyInputFailure
UnsupportedCharacterFailure
LowercaseNotAllowedFailure
GrammarFailure(DiagnosticCode)
NonCanonicalFailure
OutOfRangeFailure
InvalidConfigurationFailure
} derive(Eq, Debug)
///|
/// Counts one failure category.
pub(all) struct BatchFailureCount {
kind : BatchFailureKind
count : Int
} derive(Eq, Debug)
///|
/// Retains either complete parse evidence or the typed parser error.
pub(all) enum RomanBatchOutcome {
BatchParsed(ParseReport)
BatchFailed(RomanReportError)
} derive(Eq, Debug)
///|
/// Retains one result in the same position as its input item.
pub(all) struct RomanBatchResult {
id : String
input : String
config : ParseConfig
outcome : RomanBatchOutcome
} derive(Eq, Debug)
///|
/// Summarizes batch outcomes and successful normalization behavior.
pub(all) struct RomanBatchStatistics {
total : Int
succeeded : Int
failed : Int
used_unicode_compatibility : Int
trimmed_outer_whitespace : Int
failure_counts : Array[BatchFailureCount]
} derive(Eq, Debug)
///|
/// Returns stable per-item results and aggregate statistics.
pub(all) struct RomanBatchReport {
results : Array[RomanBatchResult]
statistics : RomanBatchStatistics
} derive(Eq, Debug)
///|
/// Reports caller identity errors before any batch item is processed.
pub(all) enum BatchValidationError {
EmptyBatchItemId(Int)
DuplicateBatchItemId(String)
} derive(Eq, Debug)