#[non_exhaustive]pub enum DataTableError {
MissingHeader,
DuplicateHeader {
column: String,
},
UnevenRow {
row_number: usize,
expected: usize,
actual: usize,
},
MissingColumn {
row_number: usize,
column: String,
},
MissingCell {
row_number: usize,
column_index: usize,
},
RowParse {
row_number: usize,
source: Box<dyn StdError + Send + Sync>,
},
CellParse {
row_number: usize,
column_index: usize,
column_label: String,
source: Box<dyn StdError + Send + Sync>,
},
CacheLockFailure,
}Expand description
Errors that can arise when converting a Gherkin data table into typed rows.
DataTableError values surface through the generated step wrappers,
ensuring that failures are reported with helpful row and column context.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
MissingHeader
Raised when a typed parser expects a header row but the table is empty.
DuplicateHeader
Raised when the header row repeats a column name.
UnevenRow
Raised when a row contains more or fewer cells than expected.
Fields
MissingColumn
Raised when a column name lookup fails.
Fields
MissingCell
Raised when positional access references an out-of-range column index.
Fields
RowParse
Raised when parsing an entire row fails.
Fields
CellParse
Raised when parsing an individual cell fails.
Fields
CacheLockFailure
Raised when cached table access fails (for example, due to a poisoned lock).
Trait Implementations§
Source§impl Debug for DataTableError
impl Debug for DataTableError
Source§impl Display for DataTableError
impl Display for DataTableError
Source§impl Error for DataTableError
impl Error for DataTableError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl !RefUnwindSafe for DataTableError
impl !UnwindSafe for DataTableError
impl Forget for DataTableError
impl Freeze for DataTableError
impl Send for DataTableError
impl Sync for DataTableError
impl Unpin for DataTableError
impl UnsafeUnpin for DataTableError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more