pub struct LevelProgress {
pub level: u32,
pub total_xp: f64,
pub xp_into_level: f64,
pub xp_to_next: Option<f64>,
pub fractional_level: f64,
}Expand description
The resolved level and in-level progress for a given amount of experience.
Fields§
§level: u32The whole level reached.
total_xp: f64Total experience supplied.
xp_into_level: f64Experience accumulated past the start of the current level.
xp_to_next: Option<f64>Experience required to advance from the current level to the next, if any.
fractional_level: f64The level expressed as a fraction (e.g. 12.5 is halfway through level 12).
Trait Implementations§
Source§impl Clone for LevelProgress
impl Clone for LevelProgress
Source§fn clone(&self) -> LevelProgress
fn clone(&self) -> LevelProgress
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for LevelProgress
Source§impl Debug for LevelProgress
impl Debug for LevelProgress
Source§impl PartialEq for LevelProgress
impl PartialEq for LevelProgress
Source§impl Serialize for LevelProgress
impl Serialize for LevelProgress
impl StructuralPartialEq for LevelProgress
Auto Trait Implementations§
impl Freeze for LevelProgress
impl RefUnwindSafe for LevelProgress
impl Send for LevelProgress
impl Sync for LevelProgress
impl Unpin for LevelProgress
impl UnsafeUnpin for LevelProgress
impl UnwindSafe for LevelProgress
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