Trait TemperatureUnit

Source
pub trait TemperatureUnit {
    // Required methods
    fn celsius(&self) -> f32;
    fn fahrenheit(&self) -> f32;
}
Expand description

Trait defining the different ways to get a temperature.

Required Methods§

Source

fn celsius(&self) -> f32

Get the temperature in degrees Celsius (°C).

Source

fn fahrenheit(&self) -> f32

Get the temperature in degrees Fahrenheit (°F).

Implementors§