pub struct Product {
pub id: usize,
pub created: usize,
pub owner: usize,
pub title: String,
pub description: String,
pub method: ProductFulfillmentMethod,
pub on_sale: bool,
pub price: i32,
pub stock: i32,
pub single_use: bool,
pub data: String,
pub uploads: ProductUploads,
}Fields§
§id: usize§created: usize§owner: usize§title: String§description: String§method: ProductFulfillmentMethodHow this product will be delivered.
on_sale: boolIf this product is actually for sale.
price: i32The price of this product.
stock: i32The number of times this product can be purchased.
A negative stock means the product has unlimited stock.
single_use: boolIf this product is limited to one purchase per person.
data: StringData for this product. Only used by snippets.
uploads: ProductUploadsUploads for this product.
Implementations§
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