pub struct Shipment {Show 26 fields
pub id: ShipmentId,
pub shipment_number: String,
pub order_id: OrderId,
pub status: ShipmentStatus,
pub carrier: ShippingCarrier,
pub shipping_method: ShippingMethod,
pub tracking_number: Option<String>,
pub tracking_url: Option<String>,
pub recipient_name: String,
pub recipient_email: Option<String>,
pub recipient_phone: Option<String>,
pub shipping_address: String,
pub weight_kg: Option<Decimal>,
pub dimensions: Option<String>,
pub shipping_cost: Option<Decimal>,
pub insurance_amount: Option<Decimal>,
pub signature_required: bool,
pub shipped_at: Option<DateTime<Utc>>,
pub estimated_delivery: Option<DateTime<Utc>>,
pub delivered_at: Option<DateTime<Utc>>,
pub notes: Option<String>,
pub items: Vec<ShipmentItem>,
pub events: Vec<ShipmentEvent>,
pub version: i32,
pub created_at: DateTime<Utc>,
pub updated_at: DateTime<Utc>,
}Expand description
A shipment tracks the physical delivery of items from an order
Fields§
§id: ShipmentIdUnique identifier
shipment_number: StringHuman-readable shipment number (e.g., “SHP-ABC123”)
order_id: OrderIdOrder this shipment belongs to
status: ShipmentStatusCurrent status
carrier: ShippingCarrierShipping carrier
shipping_method: ShippingMethodShipping method/speed
tracking_number: Option<String>Carrier tracking number
tracking_url: Option<String>Auto-generated tracking URL
recipient_name: StringRecipient name
recipient_email: Option<String>Recipient email for notifications
recipient_phone: Option<String>Recipient phone
shipping_address: StringFull shipping address
weight_kg: Option<Decimal>Package weight in kg
dimensions: Option<String>Package dimensions (e.g., “10x8x6 cm”)
shipping_cost: Option<Decimal>Shipping cost
insurance_amount: Option<Decimal>Insurance amount
signature_required: boolWhether signature is required on delivery
shipped_at: Option<DateTime<Utc>>When the shipment was handed to carrier
estimated_delivery: Option<DateTime<Utc>>Expected delivery date
delivered_at: Option<DateTime<Utc>>Actual delivery timestamp
notes: Option<String>Notes about the shipment
items: Vec<ShipmentItem>Items in this shipment
events: Vec<ShipmentEvent>Tracking events/history
version: i32Version for optimistic locking
created_at: DateTime<Utc>§updated_at: DateTime<Utc>Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Shipment
impl<'de> Deserialize<'de> for Shipment
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Shipment, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Shipment, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for Shipment
impl Serialize for Shipment
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for Shipment
impl RefUnwindSafe for Shipment
impl Send for Shipment
impl Sync for Shipment
impl Unpin for Shipment
impl UnsafeUnpin for Shipment
impl UnwindSafe for Shipment
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