pub struct Temperature { /* private fields */ }Implementations§
Source§impl Temperature
impl Temperature
pub fn new( minor_units: i64, scale: u8, unit: TemperatureUnit, ) -> Result<Self, &'static str>
pub fn minor_units(self) -> i64
pub fn scale(self) -> u8
pub fn unit(self) -> TemperatureUnit
Sourcepub fn kelvin_fraction(self) -> (i128, i128)
pub fn kelvin_fraction(self) -> (i128, i128)
Exact rational Kelvin. Decimal input and affine unit offsets stay exact.
pub fn value_in(self, unit: TemperatureUnit) -> f64
Trait Implementations§
Source§impl Clone for Temperature
impl Clone for Temperature
impl Copy for Temperature
Source§impl Debug for Temperature
impl Debug for Temperature
Source§impl Display for Temperature
impl Display for Temperature
impl Eq for Temperature
Source§impl Hash for Temperature
impl Hash for Temperature
Source§impl Ord for Temperature
impl Ord for Temperature
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for Temperature
impl PartialEq for Temperature
Auto Trait Implementations§
impl Forget for Temperature
impl Freeze for Temperature
impl Move for Temperature
impl RefUnwindSafe for Temperature
impl Send for Temperature
impl Sync for Temperature
impl Unpin for Temperature
impl UnsafeUnpin for Temperature
impl UnwindSafe for Temperature
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more