pub struct Metadata {
pub servings: Option<Vec<usize>>,
pub ominous: HashMap<String, String>,
pub ingredients: HashMap<String, Ingredient>,
pub ingredients_specifiers: Vec<IngredientSpecifier>,
pub cookware: Vec<String>,
pub timer: Vec<Timer>,
}
Expand description
The metadata from the recipe is described in this metadata struct.
Fields§
§servings: Option<Vec<usize>>
Amount of servings. Is optional.
ominous: HashMap<String, String>
Other optional metadata contained in a HashMap.
ingredients: HashMap<String, Ingredient>
Exact description of an Ingredient indexed by name.
ingredients_specifiers: Vec<IngredientSpecifier>
Ingredient Specifier describing the mentioning of a Ingredient. The n-th mention of @ in Recipe::instruction is the n-th IngredientSpecifier in this Vec.
cookware: Vec<String>
The n-th mention of # in Recipe::instruction is the n-th String in this Vec.
timer: Vec<Timer>
The n-th mention of ~ in Recipe::instruction is the n-th Timer in this Vec.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Metadata
impl<'de> Deserialize<'de> for Metadata
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Metadata
impl RefUnwindSafe for Metadata
impl Send for Metadata
impl Sync for Metadata
impl Unpin for Metadata
impl UnwindSafe for Metadata
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