#[non_exhaustive]pub enum ItemModel {
LegacyNbt,
FlatNbt,
Components,
}Expand description
How item stacks carry their extra data on the wire.
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.
LegacyNbt
Numeric id, damage value and an optional NBT compound (1.8 – 1.12).
FlatNbt
Flattened id and an optional NBT compound (1.13 – 1.20.4).
Components
Flattened id and data components (1.20.5+).
Trait Implementations§
impl Copy for ItemModel
impl Eq for ItemModel
impl StructuralPartialEq for ItemModel
Auto Trait Implementations§
impl Forget for ItemModel
impl Freeze for ItemModel
impl Move for ItemModel
impl RefUnwindSafe for ItemModel
impl Send for ItemModel
impl Sync for ItemModel
impl Unpin for ItemModel
impl UnsafeUnpin for ItemModel
impl UnwindSafe for ItemModel
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