Struct rpg::item::Item
[−]
[src]
pub struct Item { pub name: String, pub item_type: ItemType, pub influence: Option<ItemInfluence>, pub stack_size: usize, pub rarity: ItemRarity, }
An item
Fields
name: String
The name of the item
item_type: ItemType
The type of the item
influence: Option<ItemInfluence>
The influence of the item (optional)
stack_size: usize
The stack size of the item
rarity: ItemRarity
The rarity of the item
Methods
impl Item
[src]
fn can_be_equipped(&self) -> bool
Returns true
if the item can be equipped
fn can_be_stacked(&self) -> bool
Returns true
if the item can be stacked
Trait Implementations
impl Clone for Item
[src]
fn clone(&self) -> Item
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl PartialEq for Item
[src]
fn eq(&self, __arg_0: &Item) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Item) -> bool
This method tests for !=
.