pub struct TopProduct {
pub product_id: Option<ProductId>,
pub sku: String,
pub name: String,
pub units_sold: u64,
pub revenue: Decimal,
pub order_count: u64,
pub average_price: Decimal,
}Expand description
Top selling product
Fields§
§product_id: Option<ProductId>Product ID
sku: StringSKU
name: StringProduct name
units_sold: u64Total units sold
revenue: DecimalTotal revenue from this product
order_count: u64Number of orders containing this product
average_price: DecimalAverage selling price
Trait Implementations§
Source§impl Clone for TopProduct
impl Clone for TopProduct
Source§fn clone(&self) -> TopProduct
fn clone(&self) -> TopProduct
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 TopProduct
impl Debug for TopProduct
Source§impl<'de> Deserialize<'de> for TopProduct
impl<'de> Deserialize<'de> for TopProduct
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<TopProduct, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<TopProduct, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for TopProduct
impl Serialize for TopProduct
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for TopProduct
impl RefUnwindSafe for TopProduct
impl Send for TopProduct
impl Sync for TopProduct
impl Unpin for TopProduct
impl UnsafeUnpin for TopProduct
impl UnwindSafe for TopProduct
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