pub enum ReadErrorKind {
UnterminatedQuote,
TrailingContent,
InvalidUtf8,
InconsistentFieldCount {
expected: usize,
found: usize,
},
RecordTooLarge {
limit: usize,
},
FieldTooLarge {
limit: usize,
},
TooManyColumns {
limit: usize,
},
NoProgress,
Deserialize(String),
Io,
}Expand description
Kinds of errors that can occur while reading CSV data.
Variants§
UnterminatedQuote
A quoted field was opened but never closed before end of input.
TrailingContent
Characters appeared after a closing quote before a delimiter or newline.
InvalidUtf8
A field contained invalid UTF-8 bytes.
InconsistentFieldCount
The number of fields differs from previous rows (strict mode).
RecordTooLarge
The configured maximum record size was exceeded.
Only produced when Reader::set_max_record_bytes
has been called. Reading stops at this point.
FieldTooLarge
The configured maximum field size was exceeded.
Only produced when Reader::set_max_field_bytes
has been called.
TooManyColumns
The configured maximum column count was exceeded.
Only produced when Reader::set_max_columns
has been called.
NoProgress
The underlying Read source returned Ok(true) without
appending any bytes, which violates the Read contract.
Reading stops at this point.
Deserialize(String)
A serde deserialization error occurred. Carries the error message.
Io
An I/O error occurred while reading the underlying source.