pub struct Unit {
pub name: String,
pub long_identifier: String,
pub display: String,
pub unit_type: UnitType,
pub ref_unit: Option<RefUnit>,
pub si_exponents: Option<SiExponents>,
pub unit_conversion: Option<UnitConversion>,
/* private fields */
}
Expand description
Specification of a measurement unit
Fields
name: String
long_identifier: String
display: String
unit_type: UnitType
ref_unit: Option<RefUnit>
si_exponents: Option<SiExponents>
unit_conversion: Option<UnitConversion>
Implementations
Trait Implementations
sourceimpl A2lObject<(u32, u32, u32, u32)> for Unit
impl A2lObject<(u32, u32, u32, u32)> for Unit
sourcefn get_layout(&self) -> &BlockInfo<(u32, u32, u32, u32)>
fn get_layout(&self) -> &BlockInfo<(u32, u32, u32, u32)>
get a reference to the BlockInfo that describes the layout of the a2l object
sourcefn get_layout_mut(&mut self) -> &mut BlockInfo<(u32, u32, u32, u32)>
fn get_layout_mut(&mut self) -> &mut BlockInfo<(u32, u32, u32, u32)>
get a mutable reference to the BlockInfo that describes the layout of the a2l object
sourcefn reset_location(&mut self)
fn reset_location(&mut self)
reset the location information on the a2l object. It will be treated like a new object when writing a file
sourcefn merge_includes(&mut self)
fn merge_includes(&mut self)
reset the reference to an include file on this objct and its children. This causes the object to be written into the output file instead of referenced through /include “filename” Read more
sourceimpl A2lObjectName for Unit
impl A2lObjectName for Unit
Auto Trait Implementations
impl RefUnwindSafe for Unit
impl Send for Unit
impl Sync for Unit
impl Unpin for Unit
impl UnwindSafe for Unit
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more