pub struct Price<CustomDataType = NoCustomData> {
pub custom_data: Option<CustomDataType>,
pub excl_tax: Option<f64>,
pub incl_tax: Option<f64>,
pub tax_rates: Option<Vec<TaxRate<CustomDataType>, 5usize>>,
}Expand description
Price with and without tax. At least one of exclTax, inclTax must be present.
Fields§
§custom_data: Option<CustomDataType>§excl_tax: Option<f64>Price/cost excluding tax. Can be absent if inclTax is present.
incl_tax: Option<f64>Price/cost including tax. Can be absent if exclTax is present.
tax_rates: Option<Vec<TaxRate<CustomDataType>, 5usize>>Trait Implementations§
Source§impl<'de, CustomDataType> Deserialize<'de> for Price<CustomDataType>where
CustomDataType: Deserialize<'de>,
impl<'de, CustomDataType> Deserialize<'de> for Price<CustomDataType>where
CustomDataType: Deserialize<'de>,
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
impl<CustomDataType: PartialEq> StructuralPartialEq for Price<CustomDataType>
Auto Trait Implementations§
impl<CustomDataType> Freeze for Price<CustomDataType>where
CustomDataType: Freeze,
impl<CustomDataType> RefUnwindSafe for Price<CustomDataType>where
CustomDataType: RefUnwindSafe,
impl<CustomDataType> Send for Price<CustomDataType>where
CustomDataType: Send,
impl<CustomDataType> Sync for Price<CustomDataType>where
CustomDataType: Sync,
impl<CustomDataType> Unpin for Price<CustomDataType>where
CustomDataType: Unpin,
impl<CustomDataType> UnsafeUnpin for Price<CustomDataType>where
CustomDataType: UnsafeUnpin,
impl<CustomDataType> UnwindSafe for Price<CustomDataType>where
CustomDataType: UnwindSafe,
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