pub struct EnchantedItem {
pub item: String,
pub enchantments: BTreeMap<String, u32>,
}Expand description
The enchanted form of EquipItem.
Fields§
§item: StringItem id (e.g. minecraft:netherite_chestplate).
enchantments: BTreeMap<String, u32>Enchantment id → level (e.g. {"minecraft:protection": 4}). Emitted as
the 1.21 minecraft:enchantments item component.
Trait Implementations§
Source§impl Clone for EnchantedItem
impl Clone for EnchantedItem
Source§impl Debug for EnchantedItem
impl Debug for EnchantedItem
Source§impl<'de> Deserialize<'de> for EnchantedItem
impl<'de> Deserialize<'de> for EnchantedItem
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for EnchantedItem
impl JsonSchema for EnchantedItem
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for EnchantedItem
impl PartialEq for EnchantedItem
Source§impl Serialize for EnchantedItem
impl Serialize for EnchantedItem
impl StructuralPartialEq for EnchantedItem
Auto Trait Implementations§
impl Freeze for EnchantedItem
impl RefUnwindSafe for EnchantedItem
impl Send for EnchantedItem
impl Sync for EnchantedItem
impl Unpin for EnchantedItem
impl UnsafeUnpin for EnchantedItem
impl UnwindSafe for EnchantedItem
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