Struct ingredient::ingredient::Ingredient
source · pub struct Ingredient {
pub name: String,
pub amounts: Vec<Measure>,
pub modifier: Option<String>,
}
Expand description
Holds a name, list of Measure, and optional modifier string
Fields§
§name: String
§amounts: Vec<Measure>
§modifier: Option<String>
Trait Implementations§
source§impl Clone for Ingredient
impl Clone for Ingredient
source§fn clone(&self) -> Ingredient
fn clone(&self) -> Ingredient
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for Ingredient
impl Debug for Ingredient
source§impl Default for Ingredient
impl Default for Ingredient
source§fn default() -> Ingredient
fn default() -> Ingredient
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for Ingredient
impl<'de> Deserialize<'de> for Ingredient
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
source§impl Display for Ingredient
impl Display for Ingredient
source§impl PartialEq<Ingredient> for Ingredient
impl PartialEq<Ingredient> for Ingredient
source§fn eq(&self, other: &Ingredient) -> bool
fn eq(&self, other: &Ingredient) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<Ingredient> for Ingredient
impl PartialOrd<Ingredient> for Ingredient
source§fn partial_cmp(&self, other: &Ingredient) -> Option<Ordering>
fn partial_cmp(&self, other: &Ingredient) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more