pub struct UnitProperty {
pub description: Option<String>,
pub id: UnitPropertyId,
pub name: String,
pub units: Vec<UnitId>,
}Expand description
UnitProperty : An unit property describes a property that can be measured by units. For example velocity, mass or volume.
Fields§
§description: Option<String>An description of this property.
id: UnitPropertyIdThe unique ID for this unit property.
name: StringThe user-displayed name of this property.
units: Vec<UnitId>The units with are measuring this property.
Implementations§
Source§impl UnitProperty
impl UnitProperty
Sourcepub fn new(id: UnitPropertyId, name: String, units: Vec<UnitId>) -> UnitProperty
pub fn new(id: UnitPropertyId, name: String, units: Vec<UnitId>) -> UnitProperty
An unit property describes a property that can be measured by units. For example velocity, mass or volume.
Trait Implementations§
Source§impl Clone for UnitProperty
impl Clone for UnitProperty
Source§fn clone(&self) -> UnitProperty
fn clone(&self) -> UnitProperty
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 UnitProperty
impl Debug for UnitProperty
Source§impl Default for UnitProperty
impl Default for UnitProperty
Source§fn default() -> UnitProperty
fn default() -> UnitProperty
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for UnitProperty
impl<'de> Deserialize<'de> for UnitProperty
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 UnitProperty
impl PartialEq for UnitProperty
Source§impl Serialize for UnitProperty
impl Serialize for UnitProperty
impl StructuralPartialEq for UnitProperty
Auto Trait Implementations§
impl Freeze for UnitProperty
impl RefUnwindSafe for UnitProperty
impl Send for UnitProperty
impl Sync for UnitProperty
impl Unpin for UnitProperty
impl UnsafeUnpin for UnitProperty
impl UnwindSafe for UnitProperty
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