csv_schema_validator/
lib.rs

1pub use csv_schema_validator_derive::ValidateCsv;
2
3pub use csv;
4pub use serde;
5
6#[doc(hidden)]
7pub mod __private {
8    pub use once_cell;
9    pub use regex;
10}
11
12#[derive(Debug, Clone, PartialEq)]
13pub struct ValidationError {
14    pub field: String,
15    pub message: String,
16}
17
18impl std::fmt::Display for ValidationError {
19    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
20        write!(f, "{}: {}", self.field, self.message)
21    }
22}
23
24impl std::error::Error for ValidationError {}