Struct typed_headers::Quality[][src]

pub struct Quality(_);

A quality value, as specified in RFC7231.

Quality values are decimal numbers between 0 and 1 (inclusive) with up to 3 fractional digits of precision.

Methods

impl Quality
[src]

Creates a quality value from a value between 0 and 1000 inclusive.

This is semantically divided by 1000 to produce a value between 0 and 1.

Panics

Panics if the value is greater than 1000.

Returns the quality multiplied by 1000 as an integer.

Trait Implementations

impl Debug for Quality
[src]

Formats the value using the given formatter. Read more

impl Copy for Quality
[src]

impl Clone for Quality
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialEq for Quality
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Eq for Quality
[src]

impl PartialOrd for Quality
[src]

This method returns an ordering between self and other values if one exists. Read more

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 Quality
[src]

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

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

Auto Trait Implementations

impl Send for Quality

impl Sync for Quality