pub struct GameRule {
pub key: Identifier,
pub category: GameRuleCategory,
pub value_type: GameRuleType,
pub default_value: GameRuleValue,
pub min_value: Option<i32>,
pub max_value: Option<i32>,
}Expand description
A game rule definition.
Fields§
§key: IdentifierThe key/name of the game rule (e.g., “keep_inventory”).
category: GameRuleCategoryThe category this game rule belongs to.
value_type: GameRuleTypeThe type of this game rule (bool or int).
default_value: GameRuleValueThe default value of this game rule.
min_value: Option<i32>Minimum value for integer game rules (None means no limit).
max_value: Option<i32>Maximum value for integer game rules (None means no limit).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GameRule
impl RefUnwindSafe for GameRule
impl Send for GameRule
impl Sync for GameRule
impl Unpin for GameRule
impl UnsafeUnpin for GameRule
impl UnwindSafe for GameRule
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