Expand description
§Items module
Core traits and types for item management in a JRPG engine.
Provides ItemProvider for querying item metadata and applying effects,
and ShopProvider for shop inventories. Both traits use associated types
so that implementing crates supply their own concrete item, effect, monster,
and shop-identifier types — no game-specific data lives in this module.
§Supporting types
| Type | Purpose |
|---|---|
Inventory<I> | Generic item inventory with add / remove / contains |
ItemResult | Outcome of attempting to use an item |
BagCategory | Broad classification of item types for UI organisation |
Re-exports§
pub use use_driver::buy;pub use use_driver::sell;pub use use_driver::use_item;pub use use_driver::ItemUseResult;pub use use_driver::ShopError;pub use use_driver::ShopReceipt;pub use use_driver::UsageContext;pub use kind::ItemKind;pub use equip::EquipProvider;pub use equip::EquipSlot;
Modules§
- equip
- Equipment system
- kind
- Item kind classification
- use_
driver - Generic item-effect application + bag/shop buy-sell flow (P0e).
Structs§
- Inventory
- Generic item inventory that stores
(item, quantity)pairs.
Enums§
- AddError
- Error returned when adding an item to an inventory fails due to capacity limits.
- BagCategory
- Broad classification of item types, used by UI code to organise bag menus.
- Item
Result - Outcome of attempting to apply an item to a monster.
Traits§
- Item
Provider - Provider trait for item metadata, usage rules, and effects.
- Shop
Provider - Provider trait for shop / mart data.
Type Aliases§
- Simple
Inventory - Convenience alias for a large-capacity inventory.