Struct GameRuleDecl
#[non_exhaustive]pub struct GameRuleDecl {
pub name: String,
pub category: String,
pub default: bool,
}Expand description
A boolean rule declared by a mod during registration.
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.name: StringNamespaced rule identifier.
category: StringCategory identifier, resolved after every mod registers.
default: boolInitial value in a new world.
Trait Implementations§
§impl Clone for GameRuleDecl
impl Clone for GameRuleDecl
§fn clone(&self) -> GameRuleDecl
fn clone(&self) -> GameRuleDecl
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 GameRuleDecl
impl Debug for GameRuleDecl
impl Eq for GameRuleDecl
§impl PartialEq for GameRuleDecl
impl PartialEq for GameRuleDecl
impl StructuralPartialEq for GameRuleDecl
Auto Trait Implementations§
impl Freeze for GameRuleDecl
impl RefUnwindSafe for GameRuleDecl
impl Send for GameRuleDecl
impl Sync for GameRuleDecl
impl Unpin for GameRuleDecl
impl UnsafeUnpin for GameRuleDecl
impl UnwindSafe for GameRuleDecl
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