pub struct SessionStats {Show 21 fields
pub enemies_killed: u32,
pub damage_dealt: f64,
pub damage_taken: f64,
pub distance_traveled: f64,
pub items_collected: u32,
pub gold_earned: u64,
pub gold_spent: u64,
pub quests_completed: u32,
pub deaths: u32,
pub highest_combo: u32,
pub critical_hits: u32,
pub skills_used: u32,
pub spells_cast: u32,
pub chests_opened: u32,
pub secrets_found: u32,
pub levels_visited: u32,
pub items_crafted: u32,
pub boss_kills: u32,
pub playtime_secs: f64,
pub max_level_reached: u32,
pub highest_score: u64,
}Fields§
§enemies_killed: u32§damage_dealt: f64§damage_taken: f64§distance_traveled: f64§items_collected: u32§gold_earned: u64§gold_spent: u64§quests_completed: u32§deaths: u32§highest_combo: u32§critical_hits: u32§skills_used: u32§spells_cast: u32§chests_opened: u32§secrets_found: u32§levels_visited: u32§items_crafted: u32§boss_kills: u32§playtime_secs: f64§max_level_reached: u32§highest_score: u64Implementations§
Source§impl SessionStats
impl SessionStats
pub fn new() -> Self
pub fn record_kill(&mut self, is_boss: bool)
pub fn record_damage_dealt(&mut self, amount: f64, is_crit: bool)
pub fn record_damage_taken(&mut self, amount: f64)
pub fn record_death(&mut self)
pub fn record_item_collected(&mut self)
pub fn record_gold(&mut self, earned: u64, spent: u64)
pub fn update_combo(&mut self, combo: u32)
pub fn k_d_ratio(&self) -> f32
pub fn accuracy(&self) -> f32
Trait Implementations§
Source§impl Clone for SessionStats
impl Clone for SessionStats
Source§fn clone(&self) -> SessionStats
fn clone(&self) -> SessionStats
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 SessionStats
impl Debug for SessionStats
Source§impl Default for SessionStats
impl Default for SessionStats
Source§fn default() -> SessionStats
fn default() -> SessionStats
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SessionStats
impl RefUnwindSafe for SessionStats
impl Send for SessionStats
impl Sync for SessionStats
impl Unpin for SessionStats
impl UnsafeUnpin for SessionStats
impl UnwindSafe for SessionStats
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.