/// Define a nutrient (a.k.a nutriment in the API docs) search parameters.
///
/// Produces a triplet of pairs
///
/// ```ignore
/// nutriment_N=<nutriment>
/// nutriment_compare_N=<op>
/// nutriment_value_N=<quantity>
/// ```
/// # Arguments
///
/// * nutrient - The nutrient name. See the [`API docs`].
/// * op - The comparation operation to perform. One of "lt", "lte", "gt", "gte",
///        "eq".
/// * value - The value to compare.
///
/// [`API docs`]: https://openfoodfacts.github.io/api-documentation/#5Filtering
Define a nutrient (a.k.a nutriment in the API docs) search parameters.
Produces a triplet of pairs


Define a nutrient ( a . k . a nutriment in the API docs ) search parameters . Produces a triplet of pairs
pub fn nutrient(&mut self, nutriment: &str, op: &str, value: u32) -> &mut Self {
        self.nutrient_index += 1;
        self.params.push((
            format!("nutriment_{}", self.nutrient_index),
            Value::from(nutriment),
        ));
        self.params.push((
            format!("nutriment_compare_{}", self.nutrient_index),
            Value::from(op),
        ));
        self.params.push((
            format!("nutriment_value_{}", self.nutrient_index),
            Value::from(value),
        ));
        self
    }
pub fn nutrient ( & mut self , nutriment : & str , op : & str , value : u32 ) -> & mut Self { self . nutrient_index += 1 ; self . params . push ( ( format ! ( " " self nutrient_index ) , Value :: from ( nutriment ) , ) ) ; self . params . push ( ( format ! ( " " self nutrient_index ) , Value :: from ( op ) , ) ) ; self . params . push ( ( format ! ( " " self nutrient_index ) , Value :: from ( value ) , ) ) ; self }
Define a nutrient (a.k.a nutriment in the API docs) search parameters.
Define a nutrient ( a . k . a nutriment in the API docs ) search parameters .
&mut self
nutriment
&str
op
&str
value
u32