[][src]Struct libmedium::units::Temperature

pub struct Temperature(_);

Struct that represents a temperature.

Implementations

impl Temperature[src]

pub fn from_degrees_celsius(degrees: impl Into<f64>) -> Self[src]

Create a Temperature struct from a value measuring degrees celsius.

pub fn from_millidegrees_celsius(millidegrees: impl Into<i32>) -> Self[src]

Create a Temperature struct from a value measuring millidegrees celsius.

pub fn from_degrees_fahrenheit(degrees: impl Into<f64>) -> Self[src]

Create a Temperature struct from a value measuring degrees fahrenheit.

pub fn as_degrees_celsius(self) -> f64[src]

Returns this struct's value as degrees celsius.

pub fn as_millidegrees_celsius(self) -> i32[src]

Returns this struct's value as millidegrees celsius.

pub fn as_degrees_fahrenheit(self) -> f64[src]

Returns this struct's value as degrees fahrenheit.

Trait Implementations

impl Add<Temperature> for Temperature[src]

type Output = Self

The resulting type after applying the + operator.

impl Clone for Temperature[src]

impl Copy for Temperature[src]

impl<S: TempSensor> Crit<Temperature> for S[src]

impl Debug for Temperature[src]

impl Display for Temperature[src]

impl<T: Into<i32>> Div<T> for Temperature[src]

type Output = Self

The resulting type after applying the / operator.

impl Eq for Temperature[src]

impl Hash for Temperature[src]

impl<S: TempSensor> LowCrit<Temperature> for S[src]

impl<S: TempSensor> Max<Temperature> for S[src]

impl<S: TempSensor> Min<Temperature> for S[src]

impl<T: Into<i32>> Mul<T> for Temperature[src]

type Output = Self

The resulting type after applying the * operator.

impl Ord for Temperature[src]

impl PartialEq<Temperature> for Temperature[src]

impl PartialOrd<Temperature> for Temperature[src]

impl Raw for Temperature[src]

impl<S: TempSensor + Faulty> Sensor<Temperature> for S[src]

fn read_input(&self) -> Result<Temperature, Error>[src]

Reads the input subfunction of this temp sensor. Returns an error, if this sensor doesn't support the subtype.

impl StructuralEq for Temperature[src]

impl StructuralPartialEq for Temperature[src]

Auto Trait Implementations

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<S> Crit<Temperature> for S where
    S: TempSensor
[src]

impl<S> Crit<Temperature> for S where
    S: TempSensor
[src]

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

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

impl<S> LowCrit<Temperature> for S where
    S: TempSensor
[src]

impl<S> LowCrit<Temperature> for S where
    S: TempSensor
[src]

impl<S> Max<Temperature> for S where
    S: TempSensor
[src]

impl<S> Max<Temperature> for S where
    S: TempSensor
[src]

impl<S> Min<Temperature> for S where
    S: TempSensor
[src]

impl<S> Min<Temperature> for S where
    S: TempSensor
[src]

impl<S> Sensor<Temperature> for S where
    S: TempSensor + Faulty
[src]

fn read_input(&Self) -> Result<Temperature, Error>[src]

Reads the input subfunction of this temp sensor. Returns an error, if this sensor doesn't support the subtype.

impl<S> Sensor<Temperature> for S where
    S: TempSensor + Faulty
[src]

fn read_input(&Self) -> Result<Temperature, Error>[src]

Reads the input subfunction of this temp sensor. Returns an error, if this sensor doesn't support the subtype.

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

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

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.