Enum fxbox_taxonomy::values::Temperature [] [src]

pub enum Temperature {
    F(f64),
    C(f64),
}

A temperature. Internal representation may be either Fahrenheit or Celcius. The FoxBox adapters are expected to perform conversions to the format requested by their devices.

Variants

F

Fahrenheit

C

Celcius

Methods

impl Temperature

fn as_f(&self) -> f64

Get a temperature in Fahrenheit.

fn as_c(&self) -> f64

Get a temperature in Celcius.

Trait Implementations

impl Deserialize for Temperature

fn deserialize<__D>(deserializer: &mut __D) -> Result<Temperature, __D::Error> where __D: Deserializer

impl Serialize for Temperature

fn serialize<__S>(&self, serializer: &mut __S) -> Result<(), __S::Error> where __S: Serializer

impl PartialOrd for Temperature

fn partial_cmp(&self, other: &Self) -> Option<Ordering>

1.0.0fn lt(&self, other: &Rhs) -> bool

1.0.0fn le(&self, other: &Rhs) -> bool

1.0.0fn gt(&self, other: &Rhs) -> bool

1.0.0fn ge(&self, other: &Rhs) -> bool

Derived Implementations

impl PartialEq for Temperature

fn eq(&self, __arg_0: &Temperature) -> bool

fn ne(&self, __arg_0: &Temperature) -> bool

impl Clone for Temperature

fn clone(&self) -> Temperature

1.0.0fn clone_from(&mut self, source: &Self)

impl Debug for Temperature

fn fmt(&self, __arg_0: &mut Formatter) -> Result