pub struct LineItem {
pub id: String,
pub description: String,
pub quantity: f64,
pub unit_code: Option<String>,
pub unit_price: f64,
pub line_total: f64,
pub tax_category: Option<TaxCategory>,
}Expand description
Line item in an invoice
Fields§
§id: StringUnique identifier for the line item
description: StringDescription of the item or service
quantity: f64Quantity of the item
unit_code: Option<String>Optional unit of measure (e.g., “KGM” for kilogram)
unit_price: f64Price per unit
line_total: f64Total amount for this line item
tax_category: Option<TaxCategory>Optional tax category for the line item
Trait Implementations§
Source§impl<'de> Deserialize<'de> for LineItem
impl<'de> Deserialize<'de> for LineItem
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 LineItem
impl RefUnwindSafe for LineItem
impl Send for LineItem
impl Sync for LineItem
impl Unpin for LineItem
impl UnwindSafe for LineItem
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