configbuilder_pattern_validator/error.rs
1use thiserror::Error;
2
3/// Errors returned by path validation ports.
4#[derive(Debug, Error)]
5pub enum ValidatorError {
6 /// Path exists but is not a directory, or another I/O failure occurred.
7 #[error("config io error: {0}")]
8 Io(String),
9}
10
11impl From<ValidatorError> for configbuilder_pattern_loader::ConfigError {
12 fn from(value: ValidatorError) -> Self {
13 match value {
14 ValidatorError::Io(message) => Self::Io(message),
15 }
16 }
17}