pub struct UnitExprItem {
pub op: MulDivOp,
pub name: Spanned<UnitRef>,
pub power: Option<Rational>,
}Expand description
One term in a unit expression.
Fields§
§op: MulDivOpMul for the first term and for *, Div for /.
name: Spanned<UnitRef>§power: Option<Rational>None means exponent 1. Rational exponents (^(1/2)) are kept exact.
Trait Implementations§
Source§impl Clone for UnitExprItem
impl Clone for UnitExprItem
Source§fn clone(&self) -> UnitExprItem
fn clone(&self) -> UnitExprItem
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for UnitExprItem
impl Debug for UnitExprItem
Source§impl FormatEquivalent for UnitExprItem
impl FormatEquivalent for UnitExprItem
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 Freeze for UnitExprItem
impl RefUnwindSafe for UnitExprItem
impl Send for UnitExprItem
impl Sync for UnitExprItem
impl Unpin for UnitExprItem
impl UnsafeUnpin for UnitExprItem
impl UnwindSafe for UnitExprItem
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