#[repr(u32)]pub enum EnchantmentLevelBasedValueKind {
Clamped = 0,
Fraction = 1,
LevelsSquared = 2,
Linear = 3,
Lookup = 4,
}
Variants§
Implementations§
Source§impl EnchantmentLevelBasedValueKind
impl EnchantmentLevelBasedValueKind
pub fn read_from_id( buf: &mut Cursor<&[u8]>, id: u32, ) -> Result<Self, BufReadError>
Source§impl EnchantmentLevelBasedValueKind
impl EnchantmentLevelBasedValueKind
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 EnchantmentLevelBasedValueKind
impl Clone for EnchantmentLevelBasedValueKind
Source§fn clone(&self) -> EnchantmentLevelBasedValueKind
fn clone(&self) -> EnchantmentLevelBasedValueKind
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<'de> Deserialize<'de> for EnchantmentLevelBasedValueKind
impl<'de> Deserialize<'de> for EnchantmentLevelBasedValueKind
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 FromNbtTag for EnchantmentLevelBasedValueKind
impl FromNbtTag for EnchantmentLevelBasedValueKind
fn from_nbt_tag(tag: NbtTag<'_, '_>) -> Option<Self>
fn from_optional_nbt_tag( tag: Option<NbtTag<'_, '_>>, ) -> Result<Option<Self>, DeserializeError>
Source§impl PartialEq for EnchantmentLevelBasedValueKind
impl PartialEq for EnchantmentLevelBasedValueKind
Source§fn eq(&self, other: &EnchantmentLevelBasedValueKind) -> bool
fn eq(&self, other: &EnchantmentLevelBasedValueKind) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.Source§impl ToNbtTag for EnchantmentLevelBasedValueKind
impl ToNbtTag for EnchantmentLevelBasedValueKind
fn to_nbt_tag(self) -> NbtTag
fn to_optional_nbt_tag(self) -> Option<NbtTag>
Source§impl TryFrom<u32> for EnchantmentLevelBasedValueKind
impl TryFrom<u32> for EnchantmentLevelBasedValueKind
impl Copy for EnchantmentLevelBasedValueKind
impl Eq for EnchantmentLevelBasedValueKind
impl StructuralPartialEq for EnchantmentLevelBasedValueKind
Auto Trait Implementations§
impl Freeze for EnchantmentLevelBasedValueKind
impl RefUnwindSafe for EnchantmentLevelBasedValueKind
impl Send for EnchantmentLevelBasedValueKind
impl Sync for EnchantmentLevelBasedValueKind
impl Unpin for EnchantmentLevelBasedValueKind
impl UnwindSafe for EnchantmentLevelBasedValueKind
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
)