Enum GameRuleValue
#[non_exhaustive]pub enum GameRuleValue {
Bool(bool),
Int(i32),
}Expand description
A registered game rule’s typed value. Case order is part of the wasm link contract.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Trait Implementations§
§impl Clone for GameRuleValue
impl Clone for GameRuleValue
§fn clone(&self) -> GameRuleValue
fn clone(&self) -> GameRuleValue
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 moreimpl Copy for GameRuleValue
§impl Debug for GameRuleValue
impl Debug for GameRuleValue
§impl<'de> Deserialize<'de> for GameRuleValue
impl<'de> Deserialize<'de> for GameRuleValue
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<GameRuleValue, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<GameRuleValue, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl Display for GameRuleValue
impl Display for GameRuleValue
impl Eq for GameRuleValue
§impl PartialEq for GameRuleValue
impl PartialEq for GameRuleValue
§impl Serialize for GameRuleValue
impl Serialize for GameRuleValue
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for GameRuleValue
Auto Trait Implementations§
impl Freeze for GameRuleValue
impl RefUnwindSafe for GameRuleValue
impl Send for GameRuleValue
impl Sync for GameRuleValue
impl Unpin for GameRuleValue
impl UnsafeUnpin for GameRuleValue
impl UnwindSafe for GameRuleValue
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