pub struct Order { /* private fields */ }Implementations§
Source§impl Order
impl Order
pub fn try_new( id: OrderId, items: Vec<CartLine>, coupon_amount: Money, shipping_method: ShippingMethod, tax: Money, currency: Currency, status: OrderStatus, total: Money, ) -> DomainResult<Self>
pub const fn id(&self) -> OrderId
pub fn items(&self) -> &[CartLine]
pub const fn total(&self) -> Money
pub const fn currency(&self) -> Currency
pub const fn shipping_method(&self) -> &ShippingMethod
pub const fn tax(&self) -> Money
Source§impl Order
impl Order
pub fn coupon_amount(&self) -> <Money as FieldAccess>::Output<'_>
pub fn status(&self) -> <OrderStatus as FieldAccess>::Output<'_>
Trait Implementations§
impl Eq for Order
impl StructuralPartialEq for Order
Auto Trait Implementations§
impl Freeze for Order
impl RefUnwindSafe for Order
impl Send for Order
impl Sync for Order
impl Unpin for Order
impl UnsafeUnpin for Order
impl UnwindSafe for Order
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