pub struct Temperature {
pub temperature_type: String,
pub value: f64,
}
Fields§
§temperature_type: String
§value: f64
Implementations§
Source§impl Temperature
impl Temperature
Sourcepub fn new() -> Temperature
pub fn new() -> Temperature
Creates a new Temperature instance
Sourcepub fn to_celsius(&self) -> f64
pub fn to_celsius(&self) -> f64
Converts the granted temperature to Celsius
Sourcepub fn to_fahrenheit(&self) -> f64
pub fn to_fahrenheit(&self) -> f64
Converts the granted temperature to Fahrenheit
Sourcepub fn to_rankine(&self) -> f64
pub fn to_rankine(&self) -> f64
Converts the granted temperature to Rankine
Sourcepub fn to_reaumur(&self) -> f64
pub fn to_reaumur(&self) -> f64
Converts the granted temperature to Réaumur
Auto Trait Implementations§
impl Freeze for Temperature
impl RefUnwindSafe for Temperature
impl Send for Temperature
impl Sync for Temperature
impl Unpin 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