pub enum GameMode {
Survival,
Creative,
Adventure,
Spectator,
}
Variants§
Implementations§
Source§impl GameMode
impl GameMode
pub const fn variant_count() -> usize
pub fn deserialize_with_id<'a>( id: u8, data: &'a [u8], ) -> DeserializeResult<'a, Self>
pub fn name(&self) -> &str
pub fn id(&self) -> u8
pub fn serialize_body<S: Serializer>(&self, to: &mut S) -> SerializeResult
Trait Implementations§
Source§impl Deserialize for GameMode
impl Deserialize for GameMode
fn mc_deserialize(data: &[u8]) -> DeserializeResult<'_, Self>
Source§impl Serialize for GameMode
impl Serialize for GameMode
fn mc_serialize<S: Serializer>(&self, to: &mut S) -> SerializeResult
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 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