pub struct Item {
pub name: String,
pub item_type: ItemType,
pub influence: Option<ItemInfluence>,
pub stack_size: usize,
pub rarity: ItemRarity,
}
Expand description
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
Implementations§
Source§impl Item
impl Item
Sourcepub fn can_be_equipped(&self) -> bool
pub fn can_be_equipped(&self) -> bool
Returns true
if the item can be equipped
Sourcepub fn can_be_stacked(&self) -> bool
pub fn can_be_stacked(&self) -> bool
Returns true
if the item can be stacked
Trait Implementations§
impl Eq for Item
impl StructuralPartialEq for Item
Auto Trait Implementations§
impl Freeze for Item
impl RefUnwindSafe for Item
impl Send for Item
impl Sync for Item
impl Unpin for Item
impl UnwindSafe for Item
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)