pub struct Recipe {
pub name: Option<String>,
pub author: Option<String>,
pub description: Option<String>,
pub ingredients: Vec<Ingredient>,
pub how_to_sections: Vec<HowToSection>,
}Expand description
A recipe extracted from HTML using parse_recipe.
Fields§
§name: Option<String>The name of the recipe.
The author of the recipe.
If the recipe specifies multiple authors, they will be joined into a single string (e.g. “Author One, Author Two”)
description: Option<String>The description of the recipe.
ingredients: Vec<Ingredient>A list of ingredients used by the recipe.
how_to_sections: Vec<HowToSection>A list of how-to-sections for the recipe.
If the recipe does not use how-to-sections this will contain a single section without a name.
Implementations§
Source§impl Recipe
impl Recipe
Sourcepub fn to_markdown(&self) -> MarkdownBuilder<'_>
pub fn to_markdown(&self) -> MarkdownBuilder<'_>
Constructs a MarkdownBuilder to convert this recipe to markdown format
Trait Implementations§
impl Eq for Recipe
impl StructuralPartialEq for Recipe
Auto Trait Implementations§
impl Freeze for Recipe
impl RefUnwindSafe for Recipe
impl Send for Recipe
impl Sync for Recipe
impl Unpin for Recipe
impl UnsafeUnpin for Recipe
impl UnwindSafe for Recipe
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more