pub struct CombatLog {
pub entries: Vec<CombatLogEntry>,
pub max_entries: usize,
}Expand description
Rolling combat event log.
Fields§
§entries: Vec<CombatLogEntry>§max_entries: usizeImplementations§
Source§impl CombatLog
impl CombatLog
pub fn new(max_entries: usize) -> Self
pub fn push(&mut self, entry: CombatLogEntry)
pub fn kills(&self) -> usize
pub fn crits(&self) -> usize
pub fn total_damage(&self) -> f32
pub fn crit_rate(&self) -> f32
pub fn avg_damage(&self) -> f32
pub fn clear(&mut self)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CombatLog
impl RefUnwindSafe for CombatLog
impl Send for CombatLog
impl Sync for CombatLog
impl Unpin for CombatLog
impl UnsafeUnpin for CombatLog
impl UnwindSafe for CombatLog
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