CsvReader.stats

inout(CsvReadStats) stats() @property ref return inout @safe pure nothrow

Access read statistics and, optionally, diagnostics collected during iteration.

  • rows: number of successfully yielded rows (includes header when present).
  • badRows: number of malformed rows that were skipped (permissive mode) or encountered (failFast mode).
  • errors: total number of errors recorded.
  • lastError: the most recent error (code/line/column/message).
  • diagnostics: per-error list populated only when CsvDialect.collectDiagnostics == true.