pub enum IngredientRangeInfo {
Coffee(u16, u16, u16),
Milk(u16, u16, u16),
HotWater(u16, u16, u16),
Taste(EcamBeverageTaste),
Temperature(EcamTemperature),
Accessory(EcamAccessory),
Inversion(bool, bool),
Brew2(bool, bool),
}Expand description
The processed ingredients from the raw ECAM responses. Some ingredients are omitted as they are not useful for brewing.
This could be done with the raw RecipeMinMaxInfo, but an older attempt at this code tried that and it became a
fairly decent mess.
Variants§
Coffee(u16, u16, u16)
Milk(u16, u16, u16)
HotWater(u16, u16, u16)
Taste(EcamBeverageTaste)
Temperature(EcamTemperature)
Accessory(EcamAccessory)
Inversion(bool, bool)
Brew2(bool, bool)
Implementations§
Source§impl IngredientRangeInfo
impl IngredientRangeInfo
Sourcepub fn new(
ingredient: EcamIngredients,
r1: Option<RecipeInfo<u16>>,
r2: Option<RecipeMinMaxInfo>,
) -> Result<Option<Self>, String>
pub fn new( ingredient: EcamIngredients, r1: Option<RecipeInfo<u16>>, r2: Option<RecipeMinMaxInfo>, ) -> Result<Option<Self>, String>
Attempts to parse a RecipeInfo and RecipeMinMaxInfo into an IngredientRangeInfo. If this fails, it returns a string with
a human-readable error.
pub fn to_default(&self) -> BrewIngredientInfo
pub fn to_arg_string(&self) -> Option<String>
pub fn ingredient(&self) -> EcamIngredients
Trait Implementations§
Source§impl Clone for IngredientRangeInfo
impl Clone for IngredientRangeInfo
Source§fn clone(&self) -> IngredientRangeInfo
fn clone(&self) -> IngredientRangeInfo
Returns a duplicate 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 IngredientRangeInfo
impl Debug for IngredientRangeInfo
Source§impl Ord for IngredientRangeInfo
impl Ord for IngredientRangeInfo
Source§fn cmp(&self, other: &IngredientRangeInfo) -> Ordering
fn cmp(&self, other: &IngredientRangeInfo) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for IngredientRangeInfo
impl PartialEq for IngredientRangeInfo
Source§impl PartialOrd for IngredientRangeInfo
impl PartialOrd for IngredientRangeInfo
impl Copy for IngredientRangeInfo
impl Eq for IngredientRangeInfo
impl StructuralPartialEq for IngredientRangeInfo
Auto Trait Implementations§
impl Freeze for IngredientRangeInfo
impl RefUnwindSafe for IngredientRangeInfo
impl Send for IngredientRangeInfo
impl Sync for IngredientRangeInfo
impl Unpin for IngredientRangeInfo
impl UnwindSafe for IngredientRangeInfo
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