LevelFor

Trait LevelFor 

Source
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§

Source

fn level_for_xp(&self, xp: u32) -> u32

Returns the level that you have using the amount of experience.

Implementors§