#[repr(u32)]pub enum Enchantment {
Show 42 variants
Protection = 0,
FireProtection = 1,
FeatherFalling = 2,
BlastProtection = 3,
ProjectileProtection = 4,
Respiration = 5,
AquaAffinity = 6,
Thorns = 7,
DepthStrider = 8,
FrostWalker = 9,
BindingCurse = 10,
SoulSpeed = 11,
SwiftSneak = 12,
Sharpness = 13,
Smite = 14,
BaneOfArthropods = 15,
Knockback = 16,
FireAspect = 17,
Looting = 18,
SweepingEdge = 19,
Efficiency = 20,
SilkTouch = 21,
Unbreaking = 22,
Fortune = 23,
Power = 24,
Punch = 25,
Flame = 26,
Infinity = 27,
LuckOfTheSea = 28,
Lure = 29,
Loyalty = 30,
Impaling = 31,
Riptide = 32,
Channeling = 33,
Multishot = 34,
QuickCharge = 35,
Piercing = 36,
Density = 37,
Breach = 38,
WindBurst = 39,
Mending = 40,
VanishingCurse = 41,
}
Variants§
Protection = 0
FireProtection = 1
FeatherFalling = 2
BlastProtection = 3
ProjectileProtection = 4
Respiration = 5
AquaAffinity = 6
Thorns = 7
DepthStrider = 8
FrostWalker = 9
BindingCurse = 10
SoulSpeed = 11
SwiftSneak = 12
Sharpness = 13
Smite = 14
BaneOfArthropods = 15
Knockback = 16
FireAspect = 17
Looting = 18
SweepingEdge = 19
Efficiency = 20
SilkTouch = 21
Unbreaking = 22
Fortune = 23
Power = 24
Punch = 25
Flame = 26
Infinity = 27
LuckOfTheSea = 28
Lure = 29
Loyalty = 30
Impaling = 31
Riptide = 32
Channeling = 33
Multishot = 34
QuickCharge = 35
Piercing = 36
Density = 37
Breach = 38
WindBurst = 39
Mending = 40
VanishingCurse = 41
Implementations§
Source§impl Enchantment
impl Enchantment
pub fn read_from_id( buf: &mut Cursor<&[u8]>, id: u32, ) -> Result<Self, BufReadError>
Source§impl Enchantment
impl Enchantment
Sourcepub unsafe fn from_u32_unchecked(id: u32) -> Self
pub unsafe fn from_u32_unchecked(id: u32) -> Self
pub fn is_valid_id(id: u32) -> bool
Trait Implementations§
Source§impl Clone for Enchantment
impl Clone for Enchantment
Source§fn clone(&self) -> Enchantment
fn clone(&self) -> Enchantment
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for Enchantment
impl Debug for Enchantment
Source§impl<'de> Deserialize<'de> for Enchantment
impl<'de> Deserialize<'de> for Enchantment
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 Display for Enchantment
impl Display for Enchantment
Source§impl FromNbtTag for Enchantment
impl FromNbtTag for Enchantment
fn from_nbt_tag(tag: NbtTag<'_, '_>) -> Option<Self>
fn from_optional_nbt_tag( tag: Option<NbtTag<'_, '_>>, ) -> Result<Option<Self>, DeserializeError>
Source§impl FromStr for Enchantment
impl FromStr for Enchantment
Source§impl Hash for Enchantment
impl Hash for Enchantment
Source§impl McBufReadable for Enchantment
impl McBufReadable for Enchantment
Source§impl McBufWritable for Enchantment
impl McBufWritable for Enchantment
Source§impl PartialEq for Enchantment
impl PartialEq for Enchantment
Source§impl Registry for Enchantment
impl Registry for Enchantment
Source§impl Serialize for Enchantment
impl Serialize for Enchantment
Source§impl ToNbtTag for Enchantment
impl ToNbtTag for Enchantment
fn to_nbt_tag(self) -> NbtTag
fn to_optional_nbt_tag(self) -> Option<NbtTag>
Source§impl TryFrom<u32> for Enchantment
impl TryFrom<u32> for Enchantment
impl Copy for Enchantment
impl Eq for Enchantment
impl StructuralPartialEq for Enchantment
Auto Trait Implementations§
impl Freeze for Enchantment
impl RefUnwindSafe for Enchantment
impl Send for Enchantment
impl Sync for Enchantment
impl Unpin for Enchantment
impl UnwindSafe for Enchantment
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)