loopsmith-core 1.0.0

Config model and validation for loopsmith loops
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! Section C — named goals.

use schemars::JsonSchema;
use serde::{Deserialize, Serialize};

#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema)]
#[serde(deny_unknown_fields)]
pub struct Goal {
    pub name: String,
    /// Natural language. Subjective phrasing is allowed here; the validation
    /// is what has to be checkable.
    pub description: String,
    #[serde(default)]
    pub depends_on: Vec<String>,
    #[serde(default)]
    pub priority: Option<u32>,
}