pub struct Unitless;Expand description
Zero-sized marker type for dimensionless quantities.
Unitless represents a dimensionless unit with a conversion ratio of 1.0
and an empty symbol. It is used to model the result of simplifying same-unit
ratios (e.g., Meters / Meters) into a plain “number-like” Quantity<Unitless>.
Unlike a type alias to f64, this is a proper zero-sized type, which ensures
that only explicitly constructed Quantity<Unitless> values are treated as
dimensionless, not bare f64 primitives.
Trait Implementations§
Source§impl PartialOrd for Unitless
impl PartialOrd for Unitless
impl Copy for Unitless
impl StructuralPartialEq for Unitless
Auto Trait Implementations§
impl Freeze for Unitless
impl RefUnwindSafe for Unitless
impl Send for Unitless
impl Sync for Unitless
impl Unpin for Unitless
impl UnwindSafe for Unitless
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