pub struct UnitDef<P: Phase = Raw> {
pub scale_expr: Expr<P>,
pub unit_expr: UnitExpr,
pub span: Span,
}Expand description
The scale definition part of a unit declaration: 1000 m or 1 kg * m / s^2.
Fields§
§scale_expr: Expr<P>§unit_expr: UnitExpr§span: SpanTrait Implementations§
Source§impl FormatEquivalent for UnitDef
impl FormatEquivalent for UnitDef
Source§fn format_equivalent(&self, other: &Self) -> bool
fn format_equivalent(&self, other: &Self) -> bool
Returns
true if self and other are equivalent up to formatting.Auto Trait Implementations§
impl<P> Freeze for UnitDef<P>
impl<P> RefUnwindSafe for UnitDef<P>
impl<P> Send for UnitDef<P>
impl<P> Sync for UnitDef<P>
impl<P> Unpin for UnitDef<P>
impl<P> UnsafeUnpin for UnitDef<P>
impl<P> UnwindSafe for UnitDef<P>
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