pub struct ProductView {
pub ean: String,
pub name: String,
pub brand: Option<String>,
pub price: Option<f64>,
pub price_unit: Option<String>,
pub comparison_price: Option<String>,
pub price_is_approximate: bool,
pub is_available: bool,
}Fields§
§ean: StringPass this as ean to add_to_cart.
name: String§brand: Option<String>§price: Option<f64>§price_unit: Option<String>§comparison_price: Option<String>e.g. “1.69 EUR/kg”. Absent when K-Ruoka gives no comparison price.
price_is_approximate: boolWeight-priced: the final charge is settled when the order is picked.
is_available: boolfalse means the EAN is real but not buyable at this store right now.
Trait Implementations§
Source§impl Clone for ProductView
impl Clone for ProductView
Source§fn clone(&self) -> ProductView
fn clone(&self) -> ProductView
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 ProductView
impl Debug for ProductView
Source§impl From<SearchProduct> for ProductView
impl From<SearchProduct> for ProductView
Source§fn from(p: SearchProduct) -> Self
fn from(p: SearchProduct) -> Self
Converts to this type from the input type.
Source§impl JsonSchema for ProductView
impl JsonSchema for ProductView
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for ProductView
impl RefUnwindSafe for ProductView
impl Send for ProductView
impl Sync for ProductView
impl Unpin for ProductView
impl UnsafeUnpin for ProductView
impl UnwindSafe for ProductView
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