amiss-wire 0.2.0

Canonical JSON, digest domains, and the machine contracts of Amiss
Documentation
pub mod action;
pub mod controls;
pub mod de;
pub mod digest;
pub mod human;
pub mod json;
pub mod manifest;
pub mod model;
pub mod report;
pub mod requests;

#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum ExitClass {
    /// Complete evaluation, no effective blocking finding.
    Success,
    /// Complete evaluation, at least one effective blocking finding.
    BlockingFindings,
    /// Anything that prevented a trustworthy complete result.
    Failure,
}

impl ExitClass {
    #[must_use]
    pub const fn code(self) -> u8 {
        match self {
            Self::Success => 0,
            Self::BlockingFindings => 1,
            Self::Failure => 2,
        }
    }
}