Struct EnchantmentInfo
#[non_exhaustive]pub struct EnchantmentInfo {
pub id: String,
pub max_level: u32,
pub curse: bool,
}Expand description
The registry facts a recipe viewer needs for an enchantment.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.id: StringRegistry name, including namespace.
max_level: u32Largest supported level.
curse: boolWhether the enchantment is in the curse tag.
Implementations§
§impl EnchantmentInfo
impl EnchantmentInfo
pub fn new(id: String, max_level: u32, curse: bool) -> EnchantmentInfo
pub fn new(id: String, max_level: u32, curse: bool) -> EnchantmentInfo
Construct registry facts for an enchantment.
Trait Implementations§
§impl Clone for EnchantmentInfo
impl Clone for EnchantmentInfo
§fn clone(&self) -> EnchantmentInfo
fn clone(&self) -> EnchantmentInfo
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for EnchantmentInfo
impl Debug for EnchantmentInfo
impl Eq for EnchantmentInfo
§impl PartialEq for EnchantmentInfo
impl PartialEq for EnchantmentInfo
impl StructuralPartialEq for EnchantmentInfo
Auto Trait Implementations§
impl Freeze for EnchantmentInfo
impl RefUnwindSafe for EnchantmentInfo
impl Send for EnchantmentInfo
impl Sync for EnchantmentInfo
impl Unpin for EnchantmentInfo
impl UnsafeUnpin for EnchantmentInfo
impl UnwindSafe for EnchantmentInfo
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