Expand description
Fixed-capacity inventories with one bounded stack per item and atomic edits.
Inventory::exchange trades existing items between two inventories, while
Inventory::transfer_to moves them in one direction. Their check_ methods
perform the same preflight without changing either inventory. Recipe costs and
newly created outputs remain the responsibility of super::crafting::craft.
Structs§
Enums§
- Exchange
Error - First rejected part of an exchange. Neither inventory changes on an error.
- Exchange
Side - Inventory to which an
ExchangeErrorapplies, relative to the method call.
Constants§
- MAX_
EXCHANGE_ ITEMS - Maximum number of outgoing entries per side of an exchange, including repeats.