pub struct UnitSystem {
pub temperature: TempUnit,
pub pressure: PressUnit,
pub density: DensityUnit,
pub energy: EnergyUnit,
pub entropy: EntropyUnit,
pub viscosity: ViscosityUnit,
pub conductivity: ConductivityUnit,
}Expand description
Describes the set of units the user wants to work in.
Create one with a preset (refprop(), engineering(), si()) or
customise individual properties with the builder methods.
Fields§
§temperature: TempUnit§pressure: PressUnit§density: DensityUnit§energy: EnergyUnit§entropy: EntropyUnit§viscosity: ViscosityUnit§conductivity: ConductivityUnitImplementations§
Source§impl UnitSystem
impl UnitSystem
Sourcepub fn new() -> Self
pub fn new() -> Self
Start from REFPROP-native units. Use the builder methods to change individual properties.
Sourcepub fn engineering() -> Self
pub fn engineering() -> Self
Engineering / HVAC: °C, bar, kg/m³, kJ/kg, kJ/(kg·K).
pub fn temperature(self, u: TempUnit) -> Self
pub fn pressure(self, u: PressUnit) -> Self
pub fn density(self, u: DensityUnit) -> Self
pub fn energy(self, u: EnergyUnit) -> Self
pub fn entropy(self, u: EntropyUnit) -> Self
pub fn viscosity(self, u: ViscosityUnit) -> Self
pub fn conductivity(self, u: ConductivityUnit) -> Self
Trait Implementations§
Source§impl Clone for UnitSystem
impl Clone for UnitSystem
Source§fn clone(&self) -> UnitSystem
fn clone(&self) -> UnitSystem
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for UnitSystem
impl Debug for UnitSystem
Source§impl Default for UnitSystem
impl Default for UnitSystem
Source§impl<'de> Deserialize<'de> for UnitSystem
impl<'de> Deserialize<'de> for UnitSystem
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for UnitSystem
impl RefUnwindSafe for UnitSystem
impl Send for UnitSystem
impl Sync for UnitSystem
impl Unpin for UnitSystem
impl UnsafeUnpin for UnitSystem
impl UnwindSafe for UnitSystem
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