pub struct Order {
pub order_id: Option<Uuid>,
pub account_id: Option<Uuid>,
pub status: OrderStatus,
pub items: HashMap<Uuid, Item>,
pub total_price: i64,
}
Fields§
§order_id: Option<Uuid>
§account_id: Option<Uuid>
§status: OrderStatus
§items: HashMap<Uuid, Item>
§total_price: i64
Trait Implementations§
source§impl CommandExecutor<AddGiftCardToOrder> for Order
impl CommandExecutor<AddGiftCardToOrder> for Order
fn execute( cmd: AddGiftCardToOrder, state: &Self ) -> ExecutionResult<GiftCardAdded>
source§impl CommandExecutor<CancelOrder> for Order
impl CommandExecutor<CancelOrder> for Order
fn execute(cmd: CancelOrder, state: &Self) -> ExecutionResult<OrderCanceled>
source§impl CommandExecutor<CreateOrder> for Order
impl CommandExecutor<CreateOrder> for Order
fn execute(cmd: CreateOrder, state: &Self) -> ExecutionResult<OrderCreated>
source§impl CommandExecutor<ValidateOrder> for Order
impl CommandExecutor<ValidateOrder> for Order
fn execute(cmd: ValidateOrder, state: &Self) -> ExecutionResult<OrderValidated>
source§impl EventApplier<GiftCardAdded> for Order
impl EventApplier<GiftCardAdded> for Order
fn apply(&mut self, event: &GiftCardAdded) -> Result<(), ApplyError>
source§impl EventApplier<OrderCanceled> for Order
impl EventApplier<OrderCanceled> for Order
fn apply(&mut self, _: &OrderCanceled) -> Result<(), ApplyError>
source§impl EventApplier<OrderCreated> for Order
impl EventApplier<OrderCreated> for Order
fn apply(&mut self, event: &OrderCreated) -> Result<(), ApplyError>
source§impl EventApplier<OrderValidated> for Order
impl EventApplier<OrderValidated> for Order
fn apply(&mut self, _: &OrderValidated) -> Result<(), ApplyError>
Auto Trait Implementations§
impl RefUnwindSafe for Order
impl Send for Order
impl Sync for Order
impl Unpin 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