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§
impl<N, D> Copy for Per<N, D>
Source§impl<N, D> PartialOrd for Per<N, D>
impl<N, D> PartialOrd 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>
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>
Blanket Implementations§
impl<T> AccelerationUnit for T
impl<T> AngularRateUnit for T
Source§impl<T> AngularUnit for T
impl<T> AngularUnit for T
impl<T> AreaUnit 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DensityUnit for T
impl<T> DimensionlessUnit for T
impl<T> EnergyUnit for T
impl<T> ForceUnit for T
impl<T> FrequencyUnit for T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreimpl<T> InverseSolidAngleUnit for T
impl<T> LengthUnit for T
impl<T> MassUnit for T
impl<T> PhotonRadianceUnit for T
Source§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> PowerUnit for T
impl<T> PressureUnit for T
Source§impl<U, S> QuantityDivOutput<S> for U
impl<U, S> QuantityDivOutput<S> for U
impl<T> RadianceUnit for T
impl<T> SolidAngleUnit for T
impl<T> SpectralPhotonRadianceUnit for T
impl<T> SpectralRadianceUnit for T
impl<T> TemperatureUnit for T
impl<T> TimeUnit for T
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<U> UnitDiv<U> for U
impl<U> UnitDiv<U> for U
Source§type Output = SameDivOutput
type Output = SameDivOutput
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,
Source§impl<T> UsingEngine for T
impl<T> UsingEngine for T
Source§fn using<'a, Ctx>(&'a self, engine: &'a Ctx) -> WithEngine<'a, Self, Ctx>where
Ctx: TransformContext,
fn using<'a, Ctx>(&'a self, engine: &'a Ctx) -> WithEngine<'a, Self, Ctx>where
Ctx: TransformContext,
Wrap this coordinate with a custom transform context for the next
transformation call.