pub enum GameMode {
Survival,
Creative,
Adventure,
Spectator,
}Expand description
Mirror of the API gamemode enum.
Matches Minecraft’s four gamemodes exactly.
Variants§
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for GameMode
impl<'de> Deserialize<'de> for GameMode
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 From<GameMode> for GameMode
Convert from the upstream API gamemode to our mirror type.
impl From<GameMode> for GameMode
Convert from the upstream API gamemode to our mirror type.
Uses the debug representation as the canonical name, falling back
to Survival if the upstream type emits something unexpected.
impl Copy for GameMode
impl Eq for GameMode
impl StructuralPartialEq for GameMode
Auto Trait Implementations§
impl Freeze for GameMode
impl RefUnwindSafe for GameMode
impl Send for GameMode
impl Sync for GameMode
impl Unpin for GameMode
impl UnsafeUnpin for GameMode
impl UnwindSafe for GameMode
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