pub enum LevelingRate {
Erratic,
Fast,
MediumFast,
MediumSlow,
Slow,
Fluctuating,
}Expand description
Leveling rate, which determines how much experience is required for a species to level up.
Variants§
Implementations§
Source§impl LevelingRate
impl LevelingRate
Sourcepub fn exp_at_level(&self, level: u8) -> u32
pub fn exp_at_level(&self, level: u8) -> u32
The amount of experience a Mon at the given level should have.
Sourcepub fn level_from_exp(&self, exp: u32) -> u8
pub fn level_from_exp(&self, exp: u32) -> u8
Calculates a Mon’s level based on experience points.
Trait Implementations§
Source§impl Clone for LevelingRate
impl Clone for LevelingRate
Source§fn clone(&self) -> LevelingRate
fn clone(&self) -> LevelingRate
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 LevelingRate
impl Debug for LevelingRate
Source§impl<'de> Deserialize<'de> for LevelingRate
impl<'de> Deserialize<'de> for LevelingRate
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 Display for LevelingRate
impl Display for LevelingRate
Source§impl FromStr for LevelingRate
impl FromStr for LevelingRate
Source§impl PartialEq for LevelingRate
impl PartialEq for LevelingRate
Source§impl Serialize for LevelingRate
impl Serialize for LevelingRate
impl Copy for LevelingRate
impl StructuralPartialEq for LevelingRate
Auto Trait Implementations§
impl Freeze for LevelingRate
impl RefUnwindSafe for LevelingRate
impl Send for LevelingRate
impl Sync for LevelingRate
impl Unpin for LevelingRate
impl UnsafeUnpin for LevelingRate
impl UnwindSafe for LevelingRate
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