pub enum Error {
ParseError(String),
IoError(Error),
InvalidFormat(String),
InconsistentColumns {
row: usize,
expected: usize,
found: usize,
},
}Expand description
Error types for table parsing and writing operations.
This enum represents all possible errors that can occur during table operations, including parsing, validation, and I/O.
Variants§
ParseError(String)
Error during table parsing.
This variant is used when input data cannot be parsed into a valid table. The string contains details about what went wrong.
IoError(Error)
I/O error during reading or writing.
This wraps standard I/O errors that occur when reading input or writing output.
InvalidFormat(String)
Invalid format or format constraint violation.
Used when the input or output violates format constraints, such as exceeding the maximum column count or containing invalid delimiter characters.
InconsistentColumns
Inconsistent column count in table data.
This error occurs when a table row has a different number of columns than the header row.
§Fields
row: The row number (1-indexed) that has inconsistent columnsexpected: The expected number of columns (from header)found: The actual number of columns found in the row