200 lines
5.9 KiB
Rust
200 lines
5.9 KiB
Rust
#![allow(dead_code)]
|
||
|
||
#[derive(Debug)]
|
||
pub struct Ingredient {
|
||
pub key: &'static str,
|
||
pub translates: IngredientTranslate,
|
||
}
|
||
|
||
#[derive(Debug)]
|
||
pub struct IngredientTranslate {
|
||
pub rus: &'static str,
|
||
pub eng: Option<&'static str>,
|
||
}
|
||
|
||
#[derive(Debug)]
|
||
pub struct Recipe {
|
||
pub key: &'static str,
|
||
pub steps: u8,
|
||
pub ingredients: Vec<RecipeIngredient>,
|
||
pub translates: RecipeTranslates,
|
||
}
|
||
|
||
#[derive(Debug)]
|
||
pub struct RecipeIngredient {
|
||
pub key: &'static str,
|
||
pub measure: RecipeIngredientMeasure,
|
||
}
|
||
|
||
#[derive(Debug)]
|
||
pub enum RecipeIngredientMeasure {
|
||
Gram(u32),
|
||
KiloGram(u32),
|
||
MilliLiter(u32),
|
||
Liter(u32),
|
||
}
|
||
|
||
#[derive(Debug)]
|
||
pub struct RecipeTranslates {
|
||
pub rus: RecipeTranslate,
|
||
pub eng: Option<RecipeTranslate>,
|
||
}
|
||
|
||
#[derive(Debug)]
|
||
pub struct RecipeTranslate {
|
||
pub name: &'static str,
|
||
pub instructions: Vec<&'static str>,
|
||
}
|
||
|
||
pub const INGREDIENTS: [Ingredient; 11] = [
|
||
Ingredient {
|
||
key: "water",
|
||
translates: IngredientTranslate {
|
||
rus: "вода",
|
||
eng: Some(
|
||
"water",
|
||
),
|
||
},
|
||
},
|
||
Ingredient {
|
||
key: "carrot",
|
||
translates: IngredientTranslate {
|
||
rus: "морковь",
|
||
eng: Some(
|
||
"carrot",
|
||
),
|
||
},
|
||
},
|
||
Ingredient {
|
||
key: "potato",
|
||
translates: IngredientTranslate {
|
||
rus: "картофель",
|
||
eng: Some(
|
||
"potato",
|
||
),
|
||
},
|
||
},
|
||
Ingredient {
|
||
key: "wheat_flour",
|
||
translates: IngredientTranslate {
|
||
rus: "пшеничная мука",
|
||
eng: Some(
|
||
"wheat flour",
|
||
),
|
||
},
|
||
},
|
||
Ingredient {
|
||
key: "olive_oil",
|
||
translates: IngredientTranslate {
|
||
rus: "оливковое масло",
|
||
eng: Some(
|
||
"olive oil",
|
||
),
|
||
},
|
||
},
|
||
Ingredient {
|
||
key: "dry_yeast",
|
||
translates: IngredientTranslate {
|
||
rus: "сухие дрожжи",
|
||
eng: Some(
|
||
"dry yeast",
|
||
),
|
||
},
|
||
},
|
||
Ingredient {
|
||
key: "apple",
|
||
translates: IngredientTranslate {
|
||
rus: "яблоко",
|
||
eng: Some(
|
||
"apple",
|
||
),
|
||
},
|
||
},
|
||
Ingredient {
|
||
key: "banana",
|
||
translates: IngredientTranslate {
|
||
rus: "банан",
|
||
eng: Some(
|
||
"banana",
|
||
),
|
||
},
|
||
},
|
||
Ingredient {
|
||
key: "orange",
|
||
translates: IngredientTranslate {
|
||
rus: "апельсин",
|
||
eng: Some(
|
||
"orange",
|
||
),
|
||
},
|
||
},
|
||
Ingredient {
|
||
key: "salt",
|
||
translates: IngredientTranslate {
|
||
rus: "соль",
|
||
eng: Some(
|
||
"salt",
|
||
),
|
||
},
|
||
},
|
||
Ingredient {
|
||
key: "sugar",
|
||
translates: IngredientTranslate {
|
||
rus: "сахар",
|
||
eng: Some(
|
||
"sugar",
|
||
),
|
||
},
|
||
},
|
||
];
|
||
|
||
lazy_static::lazy_static! {
|
||
pub static ref RECIPES: [Recipe; 1] = [
|
||
Recipe {
|
||
key: "thin_crispy_pizza_base",
|
||
steps: 7,
|
||
ingredients: vec![
|
||
RecipeIngredient {
|
||
key: "salt",
|
||
measure: RecipeIngredientMeasure::Gram(5),
|
||
},
|
||
RecipeIngredient {
|
||
key: "sugar",
|
||
measure: RecipeIngredientMeasure::Gram(4),
|
||
},
|
||
RecipeIngredient {
|
||
key: "wheat_flour",
|
||
measure: RecipeIngredientMeasure::Gram(500),
|
||
},
|
||
RecipeIngredient {
|
||
key: "dry_yeast",
|
||
measure: RecipeIngredientMeasure::Gram(7),
|
||
},
|
||
RecipeIngredient {
|
||
key: "olive_oil",
|
||
measure: RecipeIngredientMeasure::MilliLiter(25),
|
||
},
|
||
RecipeIngredient {
|
||
key: "water",
|
||
measure: RecipeIngredientMeasure::MilliLiter(250),
|
||
},
|
||
],
|
||
translates: RecipeTranslates {
|
||
rus: RecipeTranslate {
|
||
name: "Тонкая хрустящая основа для пиццы",
|
||
instructions: vec![
|
||
"Растворить дрожжи в воде, подогретой до температуры тела.",
|
||
"Добавить соль, сахар, оливковое масло и хорошо перемешать до однородной консистенции.",
|
||
"Добавить муку и замесить тесто. Вымешивать не менее 15 минут.",
|
||
"Разделить тесто на 3 порции, каждую завернуть в пищевую плёнку и дать настояться около 30 минут.",
|
||
"Растянуть один кусок теста до тонкого состояния и аккуратно переложить на смазанный растительным маслом противень.",
|
||
"Смазать соусом, чтобы тесто не осталось жидким и чтобы начинка не скользила по нему, и поставить в предварительно разогретую до максимальной температуры (не меньше 250 градусов) на 5-10 минут. В результате тесто хорошо пропечется и станет хрустящим.",
|
||
"Теперь на основу можно выкладывать начинку на ваш вкус и запекать до момента, когда сыр растает.",
|
||
],
|
||
},
|
||
eng: None,
|
||
},
|
||
},
|
||
];
|
||
}
|