Struct nps::rating::Rating
[−]
[src]
pub struct Rating { pub value: u8, pub comment: Option<&'static str>, }
A Net Promoter Score rating is a simple value between 0 and 10 with an optional comment attached that provides additional details
Fields
value: u8
comment: Option<&'static str>
Methods
impl Rating
[src]
fn new(value: u8) -> Rating
Construct a new rating without a comment
fn with_comment(value: u8, c: &'static str) -> Rating
Construct a new rating that includes a comment
Trait Implementations
impl Debug for Rating
[src]
impl Clone for Rating
[src]
fn clone(&self) -> Rating
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
impl Copy for Rating
[src]
impl PartialEq<Rating> for Rating
[src]
fn eq(&self, other: &Rating) -> bool
Equality is computed only based on the value of the rating
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl Eq for Rating
[src]
impl PartialOrd<Rating> for Rating
[src]
fn partial_cmp(&self, other: &Rating) -> Option<Ordering>
Ratings are compared only based on the value (the comment is ignored)
fn lt(&self, other: &Rhs) -> bool
1.0.0
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Rhs) -> bool
1.0.0
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &Rhs) -> bool
1.0.0
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Rhs) -> bool
1.0.0
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more