pub struct FoodServing {
pub description: String,
pub amount: f64,
pub gram_weight: f64,
}Expand description
A serving option for a food item (from Typesense search results).
Fields§
§description: StringServing description (e.g. “oz”, “cup”, “bar”)
amount: f64Amount in display units (e.g. 3.0)
gram_weight: f64Weight in grams for this serving (e.g. 85.0)
Trait Implementations§
Source§impl Clone for FoodServing
impl Clone for FoodServing
Source§fn clone(&self) -> FoodServing
fn clone(&self) -> FoodServing
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 FoodServing
impl Debug for FoodServing
Source§impl<'de> Deserialize<'de> for FoodServing
impl<'de> Deserialize<'de> for FoodServing
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 FoodServing
impl RefUnwindSafe for FoodServing
impl Send for FoodServing
impl Sync for FoodServing
impl Unpin for FoodServing
impl UnsafeUnpin for FoodServing
impl UnwindSafe for FoodServing
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