aboutsummaryrefslogtreecommitdiff
path: root/rif/src/recipe.rs
blob: 0e3b8feb2c8b727e70c2a0458e42951d0c93bdaa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
use crate::{Ingredient, Schema, Thread, Workstep};
use std::collections::BTreeSet;

/// A recipe with instructions to execute
pub struct Recipe {
    schema: Schema,
    metadata: Metadata,
    threads: BTreeSet<Thread>,
}

impl Recipe {
    /// Create a new recipe from a schema, with a name and version
    pub fn new(schema: Schema, name: String, version: String) -> Self {
        Self {
            schema,
            metadata: Metadata { name, version },
            threads: Default::default(),
        }
    }
}

pub struct Metadata {
    pub name: String,
    pub version: String,
}