#[non_exhaustive]pub enum ItemText {
Legacy(String),
Json(String),
Nbt(AnonNbt),
}Expand description
A text field of an item (custom name, lore line) 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.
Legacy(String)
1.8 / 1.12: a string with § formatting codes.
Json(String)
1.16.5: a JSON text component.
Nbt(AnonNbt)
26.1: an NBT text component.
Implementations§
Trait Implementations§
impl StructuralPartialEq for ItemText
Auto Trait Implementations§
impl !Freeze for ItemText
impl Forget for ItemText
impl Move for ItemText
impl RefUnwindSafe for ItemText
impl Send for ItemText
impl Sync for ItemText
impl Unpin for ItemText
impl UnsafeUnpin for ItemTextwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const u8: UnsafeUnpin,
Align8<*mut ()>: UnsafeUnpin,
&'static Vtable: UnsafeUnpin,
impl UnwindSafe for ItemTextwhere
RawVecInner: UnwindSafe,
*const u8: UnwindSafe,
Align8<*mut ()>: UnwindSafe,
&'static Vtable: 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