pub struct Unit {
pub description: Option<String>,
pub full_name_plural: String,
pub full_name_singular: String,
pub id: UnitId,
pub short_name: String,
pub unit_property: UnitPropertyId,
}Fields§
§description: Option<String>Description of this unit.
full_name_plural: StringThe plural version of this unit’s name. Is used by a value of two and more. (We do not support Slovenian dual numerus versions) E.g.: Kilogram -> Kilograms gram -> meters
full_name_singular: StringThe singular version of this unit’s name. E.g.: Kilogram Gram
id: UnitIdUnique id for this unit.
short_name: StringShort name or abbreviation of this unit. E.g.: kg for Kilogram g for gram m for meter
unit_property: UnitPropertyIdWhich property is described by this unit. E.g.: kg -> Mass L -> Volume m/s -> Speed and so forth
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Unit
impl<'de> Deserialize<'de> for Unit
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
impl StructuralPartialEq for Unit
Auto Trait Implementations§
impl Freeze for Unit
impl RefUnwindSafe for Unit
impl Send for Unit
impl Sync for Unit
impl Unpin for Unit
impl UnsafeUnpin for Unit
impl UnwindSafe for Unit
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