[][src]Struct macsmc::Celsius

pub struct Celsius(pub f32);

Temperature in Celsius (centigrade) scale. This is the default scale being used.

Examples

let celsius = Celsius(42.0);

assert_eq!(*celsius, 42.0);
assert_eq!(Into::<Fahrenheit>::into(celsius), Fahrenheit(107.6));

Implementations

impl Celsius[src]

pub const fn thresholds() -> [Self; 4][src]

Thresholds that might be sensible to partition a temperature value into one of 4 buckets.

Examples

let very_hot = Celsius::thresholds()[3];
let quite_hot = Celsius::thresholds()[2];
let warm = Celsius::thresholds()[1];
let ok = Celsius::thresholds()[0];

Trait Implementations

impl Clone for Celsius[src]

impl Copy for Celsius[src]

impl Debug for Celsius[src]

impl Default for Celsius[src]

impl Deref for Celsius[src]

type Target = f32

The resulting type after dereferencing.

impl From<Celsius> for Fahrenheit[src]

impl Into<f64> for Celsius[src]

impl PartialEq<Celsius> for Celsius[src]

impl PartialOrd<Celsius> for Celsius[src]

impl StructuralPartialEq for Celsius[src]

Auto Trait Implementations

impl RefUnwindSafe for Celsius

impl Send for Celsius

impl Sync for Celsius

impl Unpin for Celsius

impl UnwindSafe for Celsius

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.