Struct measurements::temperature::TemperatureDelta [] [src]

pub struct TemperatureDelta { /* fields omitted */ }

The TemperatureDelta struct can be used to deal with differences between temperatures in a common way.

Example

use measurements::{Temperature, TemperatureDelta};

let boiling_water = Temperature::from_celsius(100.0);
let frozen_water = Temperature::from_celsius(0.0);
let difference: TemperatureDelta = boiling_water - frozen_water;
println!("Boiling water is {} above freezing.", difference);

Methods

impl TemperatureDelta
[src]

[src]

Create a new TemperatureDelta from a floating point value in Kelvin

[src]

Create a new TemperatureDelta from a floating point value in Celsius

[src]

Create a new TemperatureDelta from a floating point value in Fahrenheit

[src]

Create a new TemperatureDelta from a floating point value in Rankine

[src]

Convert this TemperatureDelta to a floating point value in Kelvin

[src]

Convert this TemperatureDelta to a floating point value in Celsius

[src]

Convert this TemperatureDelta to a floating point value in Fahrenheit

[src]

Convert this TemperatureDelta to a floating point value in Rankine

Trait Implementations

impl Copy for TemperatureDelta
[src]

impl Clone for TemperatureDelta
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for TemperatureDelta
[src]

[src]

Formats the value using the given formatter. Read more

impl Measurement for TemperatureDelta
[src]

[src]

Get this quantity in the base units

[src]

Create a new quantity from the base units

[src]

Return the base unit for this type, as a string. For example "kilograms" Read more

[src]

Returns a string containing the most appropriate units for this quantity, and a floating point value representing this quantity in those units. Useful when, for example, a length might be in millimeters if it is very small, or kilometers when it is very large. Read more

[src]

Given a list of units and their scale relative to the base unit, select the most appropriate one. Read more

impl Add<TemperatureDelta> for Temperature
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl Add<Temperature> for TemperatureDelta
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl Sub<TemperatureDelta> for Temperature
[src]

The resulting type after applying the - operator.

[src]

Performs the - operation.

impl Display for TemperatureDelta
[src]

[src]

Formats the value using the given formatter. Read more

impl Add for TemperatureDelta
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl Sub for TemperatureDelta
[src]

The resulting type after applying the - operator.

[src]

Performs the - operation.

impl Div<TemperatureDelta> for TemperatureDelta
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl Div<f64> for TemperatureDelta
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl Mul<f64> for TemperatureDelta
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl Mul<TemperatureDelta> for f64
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl Eq for TemperatureDelta
[src]

impl PartialEq for TemperatureDelta
[src]

[src]

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

1.0.0
[src]

This method tests for !=.

impl PartialOrd for TemperatureDelta
[src]

[src]

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

1.0.0
[src]

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

1.0.0
[src]

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

1.0.0
[src]

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

1.0.0
[src]

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

Auto Trait Implementations