configbuilder-pattern-validator 0.1.0

configbuilder-pattern: validator domain, trait contract + tech-agnostic reference implementation.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use thiserror::Error;

/// Errors returned by path validation ports.
#[derive(Debug, Error)]
pub enum ValidatorError {
    /// Path exists but is not a directory, or another I/O failure occurred.
    #[error("config io error: {0}")]
    Io(String),
}

impl From<ValidatorError> for configbuilder_pattern_loader::ConfigError {
    fn from(value: ValidatorError) -> Self {
        match value {
            ValidatorError::Io(message) => Self::Io(message),
        }
    }
}