pub struct Unit {
pub keyword: UnitKeyword,
pub name: String,
pub conversion_factor: Option<f64>,
pub identifiers: Vec<Identifier>,
}Expand description
A unit of measurement with an optional conversion factor to the SI base unit.
WKT2 keywords: ANGLEUNIT, LENGTHUNIT, SCALEUNIT, PARAMETRICUNIT,
TIMEUNIT, TEMPORALQUANTITY, UNIT.
Fields§
§keyword: UnitKeywordWhich keyword was used in the WKT.
name: StringThe unit name (e.g. “metre”, “degree”).
conversion_factor: Option<f64>The conversion factor to the SI base unit (metres for length, radians for angle,
seconds for time, unity for scale). Optional only for TIMEUNIT when the
conversion is not a simple scaling (e.g. “calendar month”).
identifiers: Vec<Identifier>Identifiers for this unit.
Trait Implementations§
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