#[non_exhaustive]pub enum MattenDataError {
Csv {
message: String,
},
Io {
path: PathBuf,
source: Error,
},
EmptyInput,
MissingColumn {
name: String,
},
DuplicateColumn {
name: String,
},
DuplicateSelection {
name: String,
},
RaggedRow {
row: usize,
expected: usize,
actual: usize,
},
NonNumericValue {
column: String,
row: usize,
value: String,
},
MissingValue {
column: String,
row: usize,
},
EmptySelection,
Matten(MattenError),
}Expand description
Errors produced by matten-data table ingestion and conversion.
All external-input APIs return this type; malformed input never panics (RFC-035 §1). Error messages include row/column context where practical. Row numbers are one-based CSV line numbers (the header is line 1, so the first data row is line 2).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Csv
A CSV structural problem reported by the parser or by header validation (for example an empty header name).
Io
An I/O error while reading a CSV path.
EmptyInput
The input was empty (no header row).
MissingColumn
A requested column name does not exist in the table.
DuplicateColumn
The CSV header contains a duplicate column name.
DuplicateSelection
The same column name was requested more than once in a selection.
RaggedRow
A data row has a different number of cells than the header.
Fields
NonNumericValue
A cell could not be converted to f64 during numeric conversion.
Fields
MissingValue
A missing cell remained during numeric conversion (fill it first).
EmptySelection
A column selection or conversion was attempted with no columns.
Matten(MattenError)
A wrapped core matten error (for example from Tensor construction).
Trait Implementations§
Source§impl Debug for MattenDataError
impl Debug for MattenDataError
Source§impl Display for MattenDataError
impl Display for MattenDataError
Source§impl Error for MattenDataError
impl Error for MattenDataError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()