[−][src]Struct libmedium::units::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.
fn add(self, other: Self) -> Self
[src]
impl Clone for Temperature
[src]
fn clone(&self) -> Temperature
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for Temperature
[src]
impl<S: TempSensor> Crit<Temperature> for S
[src]
fn read_crit(&self) -> Result<P, Error>
[src]
fn write_crit(&self, crit: P) -> Result<(), Error> where
Self: WritableSensorBase,
[src]
Self: WritableSensorBase,
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.
fn div(self, other: T) -> Temperature
[src]
impl Eq for Temperature
[src]
impl Hash for Temperature
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<S: TempSensor> LowCrit<Temperature> for S
[src]
fn read_lcrit(&self) -> Result<P, Error>
[src]
fn write_lcrit(&self, lcrit: P) -> Result<(), Error> where
Self: WritableSensorBase,
[src]
Self: WritableSensorBase,
impl<S: TempSensor> Max<Temperature> for S
[src]
fn read_max(&self) -> Result<P, Error>
[src]
fn write_max(&self, max: P) -> Result<(), Error> where
Self: WritableSensorBase,
[src]
Self: WritableSensorBase,
impl<S: TempSensor> Min<Temperature> for S
[src]
fn read_min(&self) -> Result<P, Error>
[src]
fn write_min(&self, min: P) -> Result<(), Error> where
Self: WritableSensorBase,
[src]
Self: WritableSensorBase,
impl<T: Into<i32>> Mul<T> for Temperature
[src]
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, other: T) -> Temperature
[src]
impl Ord for Temperature
[src]
fn cmp(&self, other: &Temperature) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<Temperature> for Temperature
[src]
fn eq(&self, other: &Temperature) -> bool
[src]
fn ne(&self, other: &Temperature) -> bool
[src]
impl PartialOrd<Temperature> for Temperature
[src]
fn partial_cmp(&self, other: &Temperature) -> Option<Ordering>
[src]
fn lt(&self, other: &Temperature) -> bool
[src]
fn le(&self, other: &Temperature) -> bool
[src]
fn gt(&self, other: &Temperature) -> bool
[src]
fn ge(&self, other: &Temperature) -> bool
[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.
fn read_enable(&self) -> Result<bool, Error>
[src]
fn write_enable(&self, enable: bool) -> Result<(), Error> where
Self: WritableSensorBase,
[src]
Self: WritableSensorBase,
impl StructuralEq for Temperature
[src]
impl StructuralPartialEq for Temperature
[src]
Auto Trait Implementations
impl RefUnwindSafe for Temperature
impl Send for Temperature
impl Sync for Temperature
impl Unpin for Temperature
impl UnwindSafe for Temperature
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<S> Crit<Temperature> for S where
S: TempSensor,
[src]
S: TempSensor,
fn read_crit(&self) -> Result<P, Error>
[src]
fn write_crit(&self, crit: P) -> Result<(), Error> where
Self: WritableSensorBase,
[src]
Self: WritableSensorBase,
impl<S> Crit<Temperature> for S where
S: TempSensor,
[src]
S: TempSensor,
fn read_crit(&self) -> Result<P, Error>
[src]
fn write_crit(&self, crit: P) -> Result<(), Error> where
Self: WritableSensorBase,
[src]
Self: WritableSensorBase,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<S> LowCrit<Temperature> for S where
S: TempSensor,
[src]
S: TempSensor,
fn read_lcrit(&self) -> Result<P, Error>
[src]
fn write_lcrit(&self, lcrit: P) -> Result<(), Error> where
Self: WritableSensorBase,
[src]
Self: WritableSensorBase,
impl<S> LowCrit<Temperature> for S where
S: TempSensor,
[src]
S: TempSensor,
fn read_lcrit(&self) -> Result<P, Error>
[src]
fn write_lcrit(&self, lcrit: P) -> Result<(), Error> where
Self: WritableSensorBase,
[src]
Self: WritableSensorBase,
impl<S> Max<Temperature> for S where
S: TempSensor,
[src]
S: TempSensor,
fn read_max(&self) -> Result<P, Error>
[src]
fn write_max(&self, max: P) -> Result<(), Error> where
Self: WritableSensorBase,
[src]
Self: WritableSensorBase,
impl<S> Max<Temperature> for S where
S: TempSensor,
[src]
S: TempSensor,
fn read_max(&self) -> Result<P, Error>
[src]
fn write_max(&self, max: P) -> Result<(), Error> where
Self: WritableSensorBase,
[src]
Self: WritableSensorBase,
impl<S> Min<Temperature> for S where
S: TempSensor,
[src]
S: TempSensor,
fn read_min(&self) -> Result<P, Error>
[src]
fn write_min(&self, min: P) -> Result<(), Error> where
Self: WritableSensorBase,
[src]
Self: WritableSensorBase,
impl<S> Min<Temperature> for S where
S: TempSensor,
[src]
S: TempSensor,
fn read_min(&self) -> Result<P, Error>
[src]
fn write_min(&self, min: P) -> Result<(), Error> where
Self: WritableSensorBase,
[src]
Self: WritableSensorBase,
impl<S> Sensor<Temperature> for S where
S: TempSensor + Faulty,
[src]
S: TempSensor + Faulty,
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.
fn read_enable(&self) -> Result<bool, Error>
[src]
fn write_enable(&self, enable: bool) -> Result<(), Error> where
Self: WritableSensorBase,
[src]
Self: WritableSensorBase,
impl<S> Sensor<Temperature> for S where
S: TempSensor + Faulty,
[src]
S: TempSensor + Faulty,
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.
fn read_enable(&self) -> Result<bool, Error>
[src]
fn write_enable(&self, enable: bool) -> Result<(), Error> where
Self: WritableSensorBase,
[src]
Self: WritableSensorBase,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,