pub struct Unit {
pub name: &'static str,
pub conversion_factor: f64,
pub base_unit: [f64; 8],
}Expand description
A physical unit, defined by its name, conversion factor to SI base units, and its representation in base units.
Fields§
§name: &'static strThe human-readable name of the unit (e.g., “meter”).
conversion_factor: f64The conversion factor to the SI base unit.
base_unit: [f64; 8]The representation of the unit in terms of base units.
Auto Trait Implementations§
impl Freeze for Unit
impl RefUnwindSafe for Unit
impl Send for Unit
impl Sync for Unit
impl Unpin 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