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,
}
|