pub struct CreateReview {
pub product_id: ProductId,
pub customer_id: CustomerId,
pub rating: u8,
pub title: Option<String>,
pub body: Option<String>,
pub verified_purchase: bool,
}Expand description
Input for creating a review
Fields§
§product_id: ProductIdProduct being reviewed
customer_id: CustomerIdCustomer writing the review
rating: u8Rating (1-5)
title: Option<String>Review title
body: Option<String>Review body
verified_purchase: boolWhether purchase was verified
Trait Implementations§
Source§impl Clone for CreateReview
impl Clone for CreateReview
Source§fn clone(&self) -> CreateReview
fn clone(&self) -> CreateReview
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 CreateReview
impl Debug for CreateReview
Source§impl<'de> Deserialize<'de> for CreateReview
impl<'de> Deserialize<'de> for CreateReview
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<CreateReview, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<CreateReview, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for CreateReview
impl Serialize for CreateReview
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 CreateReview
impl RefUnwindSafe for CreateReview
impl Send for CreateReview
impl Sync for CreateReview
impl Unpin for CreateReview
impl UnsafeUnpin for CreateReview
impl UnwindSafe for CreateReview
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