pub struct ItemStack<'buffer> {
pub name: &'buffer str,
pub label: &'buffer str,
pub size: u32,
pub max_size: u32,
pub damage: u32,
pub max_damage: u32,
pub has_tag: bool,
}
Expand description
Information about an item stack.
The 'buffer
lifetime is the lifetime of the buffer holding strings to which the object
refers.
Fields§
§name: &'buffer str
The internal (Minecraft system) name of the item.
For example, this might be minecraft:cobblestone
.
label: &'buffer str
The human-readable name of the item.
For example, this might be Cobblestone
.
size: u32
The number of items in the stack.
max_size: u32
The maximum number of items that can be held in the stack.
damage: u32
The damage value of the item, if it is a tool, or zero if not.
max_damage: u32
The damage value at which the item breaks, if it is a tool, or zero if not.
has_tag: bool
Whether the item has extra NBT data attached.
Trait Implementations§
Source§impl<'buffer> Ord for ItemStack<'buffer>
impl<'buffer> Ord for ItemStack<'buffer>
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<'buffer> PartialOrd for ItemStack<'buffer>
impl<'buffer> PartialOrd for ItemStack<'buffer>
impl<'buffer> Eq for ItemStack<'buffer>
impl<'buffer> StructuralPartialEq for ItemStack<'buffer>
Auto Trait Implementations§
impl<'buffer> Freeze for ItemStack<'buffer>
impl<'buffer> RefUnwindSafe for ItemStack<'buffer>
impl<'buffer> Send for ItemStack<'buffer>
impl<'buffer> Sync for ItemStack<'buffer>
impl<'buffer> Unpin for ItemStack<'buffer>
impl<'buffer> UnwindSafe for ItemStack<'buffer>
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