pub trait LevelFor {
// Required method
fn level_for_xp(&self, xp: u32) -> u32;
}Expand description
A trait that can calculate the level for something that can accumulate experience.
We suggest using PartialFunction when implementing this trait.
Required Methods§
Sourcefn level_for_xp(&self, xp: u32) -> u32
fn level_for_xp(&self, xp: u32) -> u32
Returns the level that you have using the amount of experience.