1use thiserror::Error;
4
5pub type ValidationResult<T> = std::result::Result<T, ValidationError>;
7
8#[derive(Error, Debug)]
10pub enum ValidationError {
11 #[error("Configuration error: {0}")]
13 Config(String),
14
15 #[error("Rule parsing error: {0}")]
17 RuleParsing(String),
18
19 #[error("Crucible error: {0}")]
21 Crucible(String),
22
23 #[error("IO error: {0}")]
25 Io(#[from] std::io::Error),
26
27 #[error("YAML error: {0}")]
29 Yaml(#[from] serde_yaml::Error),
30
31 #[error("JSON error: {0}")]
33 Json(#[from] serde_json::Error),
34
35 #[error("Smelt error: {0}")]
37 Smelt(#[from] smelt_core::SmeltError),
38}