pub enum Difficulty {
Peaceful,
Easy,
Normal,
Hard,
}
Variants§
Implementations§
Source§impl Difficulty
impl Difficulty
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 Clone for Difficulty
impl Clone for Difficulty
Source§fn clone(&self) -> Difficulty
fn clone(&self) -> Difficulty
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for Difficulty
impl Debug for Difficulty
Source§impl Deserialize for Difficulty
impl Deserialize for Difficulty
fn mc_deserialize(data: &[u8]) -> DeserializeResult<'_, Self>
Source§impl From<Difficulty> for PlaySetDifficultySpec
impl From<Difficulty> for PlaySetDifficultySpec
Source§fn from(other: Difficulty) -> Self
fn from(other: Difficulty) -> Self
Converts to this type from the input type.
Source§impl From<PlaySetDifficultySpec> for Difficulty
impl From<PlaySetDifficultySpec> for Difficulty
Source§fn from(other: PlaySetDifficultySpec) -> Self
fn from(other: PlaySetDifficultySpec) -> Self
Converts to this type from the input type.
Source§impl PartialEq for Difficulty
impl PartialEq for Difficulty
Source§impl Serialize for Difficulty
impl Serialize for Difficulty
fn mc_serialize<S: Serializer>(&self, to: &mut S) -> SerializeResult
impl StructuralPartialEq for Difficulty
Auto Trait Implementations§
impl Freeze for Difficulty
impl RefUnwindSafe for Difficulty
impl Send for Difficulty
impl Sync for Difficulty
impl Unpin for Difficulty
impl UnwindSafe for Difficulty
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