pub enum CsvSliceError {
Csv(Error),
Io(Error),
ColumnNotFound(String),
}
Expand description
CsvSliceError is the main error type for the csv-slice library.
This enum represents all possible errors that can occur when working with the csv-slice library. It uses the thiserror crate to automatically implement the Error trait and provide formatted error messages.
§Error Types
Csv
: Represents errors from the csv crate when parsing or processing CSV filesIo
: Represents standard I/O errors that may occur when reading filesColumnNotFound
: A custom error that occurs when a requested column name doesn’t exist in the CSV
Variants§
Csv(Error)
Wraps errors from the csv crate The #[from] attribute automatically implements Fromcsv::Error for CsvSliceError
Io(Error)
Wraps standard I/O errors The #[from] attribute automatically implements Fromstd::io::Error for CsvSliceError
ColumnNotFound(String)
Custom error for when a requested column name is not found in the CSV headers Contains the name of the column that was not found
Trait Implementations§
Source§impl Debug for CsvSliceError
impl Debug for CsvSliceError
Source§impl Display for CsvSliceError
impl Display for CsvSliceError
Source§impl Error for CsvSliceError
impl Error for CsvSliceError
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()
Source§impl From<Error> for CsvSliceError
impl From<Error> for CsvSliceError
Auto Trait Implementations§
impl Freeze for CsvSliceError
impl !RefUnwindSafe for CsvSliceError
impl Send for CsvSliceError
impl Sync for CsvSliceError
impl Unpin for CsvSliceError
impl !UnwindSafe for CsvSliceError
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