use std::io;
use thiserror::Error;
#[derive(Error, Debug)]
pub enum SnifferError {
#[error("IO error: {0}")]
Io(#[from] io::Error),
#[error("CSV parsing error: {0}")]
Csv(#[from] csv::Error),
#[error("Could not detect CSV dialect: {0}")]
NoDialectDetected(String),
#[error("Empty file or no data to analyze")]
EmptyData,
#[error("Invalid configuration: {0}")]
InvalidConfig(String),
}
pub type Result<T> = std::result::Result<T, SnifferError>;