loopsmith-core 0.3.1

Config model and A-H validation for loopsmith loops
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! Section E — what counts as success.

use super::validation::Mode;
use serde::{Deserialize, Serialize};

#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(deny_unknown_fields)]
pub struct SuccessScenario {
    /// Goal name, or `overall`.
    pub target: String,
    pub name: String,
    pub mode: Mode,
    pub statement: String,
    /// Fraction of blocking validations that must pass, when mode is
    /// `percentage`. Ignored otherwise.
    #[serde(default)]
    pub threshold: Option<f64>,
}