pub struct Product {
pub product_name: String,
pub category: String,
pub price_per_unit: f64,
pub unit: String,
pub calories: f64,
pub proteins: f64,
pub carbohydrates: f64,
pub fats: f64,
}Fields§
§product_name: String§category: String§price_per_unit: f64§unit: String§calories: f64§proteins: f64§carbohydrates: f64§fats: f64Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Product
impl<'de> Deserialize<'de> for Product
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 Product
impl RefUnwindSafe for Product
impl Send for Product
impl Sync for Product
impl Unpin for Product
impl UnwindSafe for Product
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