pub struct Per<N, D>(/* private fields */)
where
N: Unit,
D: Unit;Expand description
Unit representing the division of two other units.
Per<N, D> corresponds to N / D and carries both the
dimensional information and the scaling ratio between the
constituent units. It is generic over any numerator and
denominator units, which allows implementing arithmetic
generically for all pairs without bespoke macros.
Trait Implementations§
Source§impl<N, D> PartialOrd for Per<N, D>
impl<N, D> PartialOrd for Per<N, D>
Source§impl<N, D> UnitDiv<Per<N, D>> for Nwhere
N: Unit,
D: Unit,
<N as Unit>::Dim: DimDiv<<D as Unit>::Dim> + DimDiv<<<N as Unit>::Dim as DimDiv<<D as Unit>::Dim>>::Output>,
<<N as Unit>::Dim as DimDiv<<D as Unit>::Dim>>::Output: Dimension,
<<N as Unit>::Dim as DimDiv<<<N as Unit>::Dim as DimDiv<<D as Unit>::Dim>>::Output>>::Output: Dimension,
impl<N, D> UnitDiv<Per<N, D>> for Nwhere
N: Unit,
D: Unit,
<N as Unit>::Dim: DimDiv<<D as Unit>::Dim> + DimDiv<<<N as Unit>::Dim as DimDiv<<D as Unit>::Dim>>::Output>,
<<N as Unit>::Dim as DimDiv<<D as Unit>::Dim>>::Output: Dimension,
<<N as Unit>::Dim as DimDiv<<<N as Unit>::Dim as DimDiv<<D as Unit>::Dim>>::Output>>::Output: Dimension,
Source§type Output = D
type Output = D
The resulting type token. Either a
Unit (wrapped in Quantity by
the Div impl) or SameDivOutput (unwrapped to the raw scalar).Source§impl<N, D> UnitMul<Per<N, D>> for Dwhere
N: Unit,
D: Unit,
<N as Unit>::Dim: DimDiv<<D as Unit>::Dim>,
<<N as Unit>::Dim as DimDiv<<D as Unit>::Dim>>::Output: Dimension,
<D as Unit>::Dim: DimMul<<<N as Unit>::Dim as DimDiv<<D as Unit>::Dim>>::Output>,
<<D as Unit>::Dim as DimMul<<<N as Unit>::Dim as DimDiv<<D as Unit>::Dim>>::Output>>::Output: Dimension,
impl<N, D> UnitMul<Per<N, D>> for Dwhere
N: Unit,
D: Unit,
<N as Unit>::Dim: DimDiv<<D as Unit>::Dim>,
<<N as Unit>::Dim as DimDiv<<D as Unit>::Dim>>::Output: Dimension,
<D as Unit>::Dim: DimMul<<<N as Unit>::Dim as DimDiv<<D as Unit>::Dim>>::Output>,
<<D as Unit>::Dim as DimMul<<<N as Unit>::Dim as DimDiv<<D as Unit>::Dim>>::Output>>::Output: Dimension,
impl<N, D> Copy for Per<N, D>
impl<N, D> StructuralPartialEq for Per<N, D>
Auto Trait Implementations§
impl<N, D> Freeze for Per<N, D>
impl<N, D> RefUnwindSafe for Per<N, D>where
N: RefUnwindSafe,
D: RefUnwindSafe,
impl<N, D> Send for Per<N, D>
impl<N, D> Sync for Per<N, D>
impl<N, D> Unpin for Per<N, D>
impl<N, D> UnsafeUnpin for Per<N, D>
impl<N, D> UnwindSafe for Per<N, D>where
N: UnwindSafe,
D: UnwindSafe,
Blanket Implementations§
Source§impl<T> AngularUnit for T
impl<T> AngularUnit for T
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