Struct nps::summary::Summary
[−]
[src]
pub struct Summary { pub promoters: u32, pub detractors: u32, pub passive: u32, pub histogram: [u32; 11], }
A NPS summary is computed starting from a vector of ratings.
It records a couple of counters that can be used to compute the and it can also show a histogram of all the ratings.
Fields
promoters: u32
Rated 9 or 10. Promoters are loyal enthusiasts.
detractors: u32
Rated 0 to 6. Detractors are unhappy customers.
passive: u32
Rated 7 or 8. Satisfied but unenthusiastic customers.
histogram: [u32; 11]
The distribution of ratings (expecting 0 to 10 values).
Methods
impl Summary
[src]
fn new(ratings: Vec<Rating>) -> Summary
fn score(&self) -> f64
Compute the NPS score for this summary of ratings
Trait Implementations
impl Debug for Summary
[src]
impl Clone for Summary
[src]
fn clone(&self) -> Summary
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more