pub enum BasketEvent {
AddItem {
item: NewItem,
},
SetItemAmount {
item_id: String,
value: AmountInfo,
},
RemoveItem {
item_id: String,
},
ClearItems,
}Expand description
A cart mutation. PATCH /kr-api/basket/by-id/{id} always takes an array of
these, even for a single change.
Names match the literals in K-Ruoka’s own bundle (pendingEvents.push(...)).
Two further events exist there – SET-ITEM-ALLOW-SUBSTITUTES and
SET-ITEM-MESSAGE-TO-STORE – deliberately not modelled, as they are outside
the tool surface.
Variants§
Trait Implementations§
Source§impl Clone for BasketEvent
impl Clone for BasketEvent
Source§fn clone(&self) -> BasketEvent
fn clone(&self) -> BasketEvent
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BasketEvent
impl Debug for BasketEvent
Auto Trait Implementations§
impl Freeze for BasketEvent
impl RefUnwindSafe for BasketEvent
impl Send for BasketEvent
impl Sync for BasketEvent
impl Unpin for BasketEvent
impl UnsafeUnpin for BasketEvent
impl UnwindSafe for BasketEvent
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