klieo-spec 0.5.0

Generic decompose / critique / refine traits and a quality loop runner.
Documentation
//! Crate-level error type.

use thiserror::Error;

/// Errors raised by `klieo-spec` traits and the loop runner.
#[derive(Debug, Error)]
pub enum SpecError {
    /// A trait implementation failed.
    #[error("trait error: {0}")]
    Impl(String),
    /// The loop ran the maximum allowed iterations without passing.
    #[error("max iterations reached ({iterations})")]
    MaxIterations {
        /// Iterations consumed before giving up.
        iterations: u8,
    },
    /// A misconfiguration in the loop (e.g. zero max iterations).
    #[error("config error: {0}")]
    Config(String),
}