pub enum ShopError {
NotEnoughMoney,
InventoryFull,
CannotSell,
InvalidQuantity,
}Expand description
Error from a shop transaction. Nothing is mutated when an error is returned.
Variants§
NotEnoughMoney
The player cannot afford the purchase.
InventoryFull
The player’s inventory cannot hold the purchased quantity (slot or per-slot capacity limit reached). No money is taken.
CannotSell
The shop refuses to buy this item, or the player does not own enough of it to sell the requested quantity.
InvalidQuantity
The requested quantity is zero.
Trait Implementations§
impl Copy for ShopError
impl Eq for ShopError
impl StructuralPartialEq for ShopError
Auto Trait Implementations§
impl Freeze for ShopError
impl RefUnwindSafe for ShopError
impl Send for ShopError
impl Sync for ShopError
impl Unpin for ShopError
impl UnsafeUnpin for ShopError
impl UnwindSafe for ShopError
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