pub struct PhyQuantity {
pub quantity_name: QuantityName,
/* private fields */
}
Expand description
Физическая величина
Fields§
§quantity_name: QuantityName
Тип физической величины
Implementations§
Source§impl PhyQuantity
impl PhyQuantity
Sourcepub fn new_length_m(value: f64) -> Self
pub fn new_length_m(value: f64) -> Self
Задать длину в [м]
Source§impl PhyQuantity
impl PhyQuantity
Sourcepub fn new_pressure_Pa(value: f64) -> Self
pub fn new_pressure_Pa(value: f64) -> Self
Задать давление в [Па]
Sourcepub fn pressure_Pa(&self) -> Result<f64, String>
pub fn pressure_Pa(&self) -> Result<f64, String>
Получить давление в [Па]
Sourcepub fn pressure_mmHg(&self) -> Result<f64, String>
pub fn pressure_mmHg(&self) -> Result<f64, String>
Получить давление в [мм рт столба]
Source§impl PhyQuantity
impl PhyQuantity
Sourcepub fn new_temperature_C(value: f64) -> Self
pub fn new_temperature_C(value: f64) -> Self
Задать температуру в [℃]
Sourcepub fn temperature_C(&self) -> Result<f64, String>
pub fn temperature_C(&self) -> Result<f64, String>
Получить температуру в [℃]
Trait Implementations§
Source§impl Add for PhyQuantity
impl Add for PhyQuantity
Source§impl Clone for PhyQuantity
impl Clone for PhyQuantity
Source§fn clone(&self) -> PhyQuantity
fn clone(&self) -> PhyQuantity
Returns a copy 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 PhyQuantity
impl Debug for PhyQuantity
Source§impl Default for PhyQuantity
impl Default for PhyQuantity
Source§fn default() -> PhyQuantity
fn default() -> PhyQuantity
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for PhyQuantity
impl<'de> Deserialize<'de> for PhyQuantity
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
Source§impl PartialEq for PhyQuantity
impl PartialEq for PhyQuantity
Source§impl Serialize for PhyQuantity
impl Serialize for PhyQuantity
impl StructuralPartialEq for PhyQuantity
Auto Trait Implementations§
impl Freeze for PhyQuantity
impl RefUnwindSafe for PhyQuantity
impl Send for PhyQuantity
impl Sync for PhyQuantity
impl Unpin for PhyQuantity
impl UnwindSafe for PhyQuantity
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