|
use crate::domain::recipe::types;
|
|
|
|
pub trait RecipeRepo {
|
|
fn get_recipes(&self) -> Vec<types::Recipe>;
|
|
}
|
|
|
|
pub struct StaticRecipeRepo;
|
|
|
|
impl RecipeRepo for StaticRecipeRepo {
|
|
fn get_recipes(&self) -> Vec<types::Recipe> {
|
|
db::RECIPES.iter().map(From::from).collect()
|
|
}
|
|
}
|