Struct rpg::inventory::Inventory
[−]
[src]
pub struct Inventory { /* fields omitted */ }
An inventory holding items
Methods
impl Inventory
[src]
fn new(max_size: usize) -> Inventory
Creates a new instance of Inventory
fn add_item(&mut self, new_item: Item) -> Result<(), Item>
Adds an item to the inventory. If the inventory is full, the item won't be added to the
inventory and a Err(Item)
is returned.
fn is_full(&self) -> bool
Returns true
it the inventory is full