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

Methods

impl Rating
[src]

Construct a new rating without a comment

Construct a new rating that includes a comment

Trait Implementations

impl Debug for Rating
[src]

Formats the value using the given formatter.

impl Clone for Rating
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Copy for Rating
[src]

impl PartialEq<Rating> for Rating
[src]

Equality is computed only based on the value of the rating

This method tests for !=.

impl Eq for Rating
[src]

impl PartialOrd<Rating> for Rating
[src]

Ratings are compared only based on the value (the comment is ignored)

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl Ord for Rating
[src]

This method returns an Ordering between self and other. Read more