openvet-policy 0.2.0

Claim catalog, requirement language, and Kleene evaluator for OpenVet.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#[derive(Debug, thiserror::Error)]
pub enum PolicyError {
    #[error("io error: {0}")]
    Io(#[from] std::io::Error),
    #[error("toml parse error: {0}")]
    Toml(#[from] toml::de::Error),
    #[error("expression: {0}")]
    ExprParse(String),
    #[error("policy: {0}")]
    Validation(String),
}

/// Convenience type alias for Result<T, PolicyError>
pub type Result<T, E = PolicyError> = std::result::Result<T, E>;