struct Recipe {\r
- ingredients: Vec<Ingredient>,\r
- process: Vec<Group>,\r
+ title: String,\r
+ estimate_time: Option<i32>, // [min].\r
+ difficulty: Option<Difficulty>,\r
+\r
+ //ingredients: Vec<Ingredient>, // For four people.\r
+ process: Vec<Group>,\r
}\r
\r
struct Ingredient {\r
- quantity: Quantity,\r
+ quantity: Option<Quantity>,\r
name: String,\r
}\r
\r
value: f32,\r
unit: String,\r
}\r
+\r
struct Group {\r
- name: String,\r
+ name: Option<String>,\r
steps: Vec<Step>,\r
}\r
\r
struct Step {\r
- action: String,\r
- input: Vec<StepInput>,\r
- output: Vec<IntermediateSubstance>,\r
+ action: String,\r
+ input: Vec<StepInput>,\r
+ output: Vec<IntermediateSubstance>,\r
}\r
\r
struct IntermediateSubstance {\r
\r
enum StepInput {\r
Ingredient(Ingredient),\r
- IntermediateSubstance,\r
-}
\ No newline at end of file
+ IntermediateSubstance(IntermediateSubstance),\r
+}\r
+\r
+enum Difficulty {\r
+ Unknown,\r
+ Easy,\r
+ Medium,\r
+ Hard,\r
+}\r