pub struct EntitySkillStatistics<T: Eq + Hash + Clone + Ord> { /* private fields */ }
Expand description
A struct representing skill statistics for a single entity.
Entity is like a KeyStrokeChar
.
Implementations§
Source§impl<T: Eq + Hash + Clone + Ord> EntitySkillStatistics<T>
impl<T: Eq + Hash + Clone + Ord> EntitySkillStatistics<T>
Sourcepub fn wrong_count_ranking(&self) -> Vec<(T, usize)>
pub fn wrong_count_ranking(&self) -> Vec<(T, usize)>
Returns entities and counts of wrong occurrences sorted by count. Sort order is descending, it means that the most wrong entity is first. Each element of the vector is ( entity, count of wrong occurrences).
Sourcepub fn accuracy(&self) -> f64
pub fn accuracy(&self) -> f64
Returns accuracy for typing this entity. This is the ratio of completely correct occurrences to all occurrences.
Sourcepub fn average_time(&self) -> Duration
pub fn average_time(&self) -> Duration
Returns average time for typing this entity.
Sourcepub fn completely_correct_count(&self) -> usize
pub fn completely_correct_count(&self) -> usize
Returns count of occurrences without wrong.
Trait Implementations§
Source§impl<T: Eq + Hash + Clone + Ord> Add for EntitySkillStatistics<T>
impl<T: Eq + Hash + Clone + Ord> Add for EntitySkillStatistics<T>
Source§fn add(self, rhs: Self) -> Self::Output
fn add(self, rhs: Self) -> Self::Output
Adds two EntitySkillStatistics
together.
When add instances with different entities, the entity of the first instance is used.
Source§type Output = EntitySkillStatistics<T>
type Output = EntitySkillStatistics<T>
The resulting type after applying the
+
operator.Source§impl<T: Clone + Eq + Hash + Clone + Ord> Clone for EntitySkillStatistics<T>
impl<T: Clone + Eq + Hash + Clone + Ord> Clone for EntitySkillStatistics<T>
Source§fn clone(&self) -> EntitySkillStatistics<T>
fn clone(&self) -> EntitySkillStatistics<T>
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<'de, T> Deserialize<'de> for EntitySkillStatistics<T>
impl<'de, T> Deserialize<'de> for EntitySkillStatistics<T>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<T> Serialize for EntitySkillStatistics<T>
impl<T> Serialize for EntitySkillStatistics<T>
impl<T: Eq + Eq + Hash + Clone + Ord> Eq for EntitySkillStatistics<T>
impl<T: Eq + Hash + Clone + Ord> StructuralPartialEq for EntitySkillStatistics<T>
Auto Trait Implementations§
impl<T> Freeze for EntitySkillStatistics<T>where
T: Freeze,
impl<T> RefUnwindSafe for EntitySkillStatistics<T>where
T: RefUnwindSafe,
impl<T> Send for EntitySkillStatistics<T>where
T: Send,
impl<T> Sync for EntitySkillStatistics<T>where
T: Sync,
impl<T> Unpin for EntitySkillStatistics<T>where
T: Unpin,
impl<T> UnwindSafe for EntitySkillStatistics<T>where
T: UnwindSafe + RefUnwindSafe,
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