#[non_exhaustive]pub enum ItemData {
None,
Nbt(RawNbt),
Components(Box<ComponentPatch>),
}Expand description
The item data a stack carries, in its version’s form.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
None
Nothing beyond the item id (no NBT; 26.1: the item’s default components).
Nbt(RawNbt)
1.8 – 1.16.5 item NBT exactly as received.
Components(Box<ComponentPatch>)
26.1 data component patch (added / removed against the item’s defaults) exactly as
received; components are decoded only when asked for. Boxed so that a Stack stays
small for the versions without components.
Implementations§
Trait Implementations§
impl Eq for ItemData
impl StructuralPartialEq for ItemData
Auto Trait Implementations§
impl !Freeze for ItemData
impl Forget for ItemData
impl Move for ItemData
impl RefUnwindSafe for ItemData
impl Send for ItemData
impl Sync for ItemData
impl Unpin for ItemData
impl UnsafeUnpin for ItemDatawhere
*const u8: UnsafeUnpin,
Align8<*mut ()>: UnsafeUnpin,
&'static Vtable: UnsafeUnpin,
*const ComponentPatch is !null: UnsafeUnpin,
PhantomData<ComponentPatch>: UnsafeUnpin,
impl UnwindSafe for ItemDatawhere
*const u8: UnwindSafe,
Align8<*mut ()>: UnwindSafe,
&'static Vtable: UnwindSafe,
BoxRaw<ComponentPatch>: UnwindSafe,
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