Struct measurements::Temperature [] [src]

pub struct Temperature { /* fields omitted */ }

The Temperature struct can be used to deal with temperatures in a common way.

Example

use measurements::Temperature;

let boiling_water = Temperature::from_celsius(100.0);
let fahrenheit = boiling_water.as_fahrenheit();
println!("Boiling water measures at {} degrees fahrenheit.", fahrenheit);

Methods

impl Temperature
[src]

Trait Implementations

impl Copy for Temperature
[src]

impl Clone for Temperature
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Temperature
[src]

Formats the value using the given formatter.

impl Measurement for Temperature
[src]

impl Add<TemperatureDelta> for Temperature
[src]

The resulting type after applying the + operator

The method for the + operator

impl Sub<TemperatureDelta> for Temperature
[src]

The resulting type after applying the - operator

The method for the - operator

impl Sub<Temperature> for Temperature
[src]

The resulting type after applying the - operator

The method for the - operator

impl Eq for Temperature
[src]

impl PartialEq for Temperature
[src]

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

This method tests for !=.

impl PartialOrd for Temperature
[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 Display for Temperature
[src]

Formats the value using the given formatter. Read more