pub struct Product {Show 19 fields
pub sku: String,
pub price: usize,
pub sale_price: Option<usize>,
pub title: String,
pub short_title: Option<String>,
pub description: String,
pub short_description: Option<String>,
pub category: String,
pub product_type: Option<String>,
pub tags: Option<Vec<ProductTag>>,
pub visible: bool,
pub details: ProductDetails,
pub updated_at: String,
pub created_at: String,
pub status: String,
pub release_date: Option<String>,
pub unpublished: Option<bool>,
pub on_wishlist: bool,
pub is_owned: bool,
}
Expand description
Represents a Minehut product response from the API. It contains most information about a product. Due to the response body from the API, many fields are optional.
Fields
sku: String
The sku, no idea what this is.
price: usize
Credits to buy the product.
sale_price: Option<usize>
Sale price to buy product, can be different from price and may not exist.
title: String
Title of the product.
short_title: Option<String>
Shorter title of the product, may not exist.
description: String
Description of the product.
short_description: Option<String>
Short description of the product, may not exist.
category: String
Category of the product.
product_type: Option<String>
Type of the product, might not exist.
Tags of the product, usually does not exist.
visible: bool
Whether product is visible.
details: ProductDetails
Other details of the product.
updated_at: String
When the product was last updates.
created_at: String
When the product was created.
status: String
Status of the product.
release_date: Option<String>
When product was released, if it was.
unpublished: Option<bool>
If it is unpublished, may not exist.
on_wishlist: bool
On wishlist, does not make sense.
is_owned: bool
Is owned. Still does not make sense.
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Product
impl<'de> Deserialize<'de> for Product
sourcefn 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 RefUnwindSafe for Product
impl Send for Product
impl Sync for Product
impl Unpin for Product
impl UnwindSafe for Product
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more