Struct diffgeom::typenum::PInt
[−]
pub struct PInt<U> where
U: NonZero + Unsigned, { /* fields omitted */ }
Type-level signed integers with positive sign.
Methods
impl<U> PInt<U> where
U: NonZero + Unsigned,
U: NonZero + Unsigned,
Trait Implementations
impl<U> Clone for PInt<U> where
U: NonZero + Unsigned + Clone,
U: NonZero + Unsigned + Clone,
fn clone(&self) -> PInt<U>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl<U> Cmp<Z0> for PInt<U> where
U: NonZero + Unsigned,
U: NonZero + Unsigned,
X > 0
type Output = Greater
The result of the comparison. It should only ever be one of Greater
, Less
, or Equal
.
impl<P, N> Cmp<NInt<N>> for PInt<P> where
N: NonZero + Unsigned,
P: NonZero + Unsigned,
N: NonZero + Unsigned,
P: NonZero + Unsigned,
X > - Y
type Output = Greater
The result of the comparison. It should only ever be one of Greater
, Less
, or Equal
.
impl<Pl, Pr> Cmp<PInt<Pr>> for PInt<Pl> where
Pl: NonZero + Unsigned + Cmp<Pr>,
Pr: NonZero + Unsigned,
Pl: NonZero + Unsigned + Cmp<Pr>,
Pr: NonZero + Unsigned,
X <==> Y
type Output = <Pl as Cmp<Pr>>::Output
The result of the comparison. It should only ever be one of Greater
, Less
, or Equal
.
impl<U> Add<Z0> for PInt<U> where
U: NonZero + Unsigned,
U: NonZero + Unsigned,
PInt + Z0 = PInt
type Output = PInt<U>
The resulting type after applying the +
operator
fn add(self, Z0) -> <PInt<U> as Add<Z0>>::Output
The method for the +
operator
impl<Ul, Ur> Add<PInt<Ur>> for PInt<Ul> where
Ul: NonZero + Unsigned + Add<Ur>,
Ur: NonZero + Unsigned,
<Ul as Add<Ur>>::Output: Unsigned,
<Ul as Add<Ur>>::Output: NonZero,
Ul: NonZero + Unsigned + Add<Ur>,
Ur: NonZero + Unsigned,
<Ul as Add<Ur>>::Output: Unsigned,
<Ul as Add<Ur>>::Output: NonZero,
P(Ul) + P(Ur) = P(Ul + Ur)
type Output = PInt<<Ul as Add<Ur>>::Output>
The resulting type after applying the +
operator
fn add(self, PInt<Ur>) -> <PInt<Ul> as Add<PInt<Ur>>>::Output
The method for the +
operator
impl<Ul, Ur> Add<NInt<Ur>> for PInt<Ul> where
Ul: NonZero + Unsigned + Cmp<Ur> + PrivateIntegerAdd<<Ul as Cmp<Ur>>::Output, Ur>,
Ur: NonZero + Unsigned,
Ul: NonZero + Unsigned + Cmp<Ur> + PrivateIntegerAdd<<Ul as Cmp<Ur>>::Output, Ur>,
Ur: NonZero + Unsigned,
P(Ul) + N(Ur)
: We resolve this with our PrivateAdd
type Output = <Ul as PrivateIntegerAdd<<Ul as Cmp<Ur>>::Output, Ur>>::Output
The resulting type after applying the +
operator
fn add(self, NInt<Ur>) -> <PInt<Ul> as Add<NInt<Ur>>>::Output
The method for the +
operator
impl<U> Debug for PInt<U> where
U: NonZero + Unsigned + Debug,
U: NonZero + Unsigned + Debug,
fn fmt(&self, __arg_0: &mut Formatter) -> Result<(), Error>
Formats the value using the given formatter.
impl<U> Neg for PInt<U> where
U: NonZero + Unsigned,
U: NonZero + Unsigned,
-PInt = NInt
impl<U> Pow<NInt<U>> for PInt<UInt<UTerm, B1>> where
U: NonZero + Unsigned,
U: NonZero + Unsigned,
1N = 1
type Output = PInt<UInt<UTerm, B1>>
The result of the exponentiation.
fn powi(self, NInt<U>) -> <PInt<UInt<UTerm, B1>> as Pow<NInt<U>>>::Output
This function isn't used in this crate, but may be useful for others. It is implemented for primitives. Read more
impl<Ul, Ur> Pow<PInt<Ur>> for PInt<Ul> where
Ul: NonZero + Unsigned + Pow<Ur>,
Ur: NonZero + Unsigned,
<Ul as Pow<Ur>>::Output: Unsigned,
<Ul as Pow<Ur>>::Output: NonZero,
Ul: NonZero + Unsigned + Pow<Ur>,
Ur: NonZero + Unsigned,
<Ul as Pow<Ur>>::Output: Unsigned,
<Ul as Pow<Ur>>::Output: NonZero,
P(Ul)P(Ur) = P(UlUr)
type Output = PInt<<Ul as Pow<Ur>>::Output>
The result of the exponentiation.
fn powi(self, PInt<Ur>) -> <PInt<Ul> as Pow<PInt<Ur>>>::Output
This function isn't used in this crate, but may be useful for others. It is implemented for primitives. Read more
impl<U> Pow<Z0> for PInt<U> where
U: NonZero + Unsigned,
U: NonZero + Unsigned,
P0 = 1
type Output = PInt<UInt<UTerm, B1>>
The result of the exponentiation.
fn powi(self, Z0) -> <PInt<U> as Pow<Z0>>::Output
This function isn't used in this crate, but may be useful for others. It is implemented for primitives. Read more
impl<U> Eq for PInt<U> where
U: NonZero + Unsigned + Eq,
U: NonZero + Unsigned + Eq,
impl<U> Min<Z0> for PInt<U> where
U: Unsigned + NonZero,
U: Unsigned + NonZero,
type Output = Z0
The type of the minimum of Self
and Rhs
fn min(self, rhs: Z0) -> <PInt<U> as Min<Z0>>::Output
Method returning the minimum
impl<Ul, Ur> Min<NInt<Ur>> for PInt<Ul> where
Ul: Unsigned + NonZero,
Ur: Unsigned + NonZero,
Ul: Unsigned + NonZero,
Ur: Unsigned + NonZero,
type Output = NInt<Ur>
The type of the minimum of Self
and Rhs
fn min(self, rhs: NInt<Ur>) -> <PInt<Ul> as Min<NInt<Ur>>>::Output
Method returning the minimum
impl<Ul, Ur> Min<PInt<Ur>> for PInt<Ul> where
Ul: Unsigned + NonZero + Min<Ur>,
Ur: Unsigned + NonZero,
<Ul as Min<Ur>>::Output: Unsigned,
<Ul as Min<Ur>>::Output: NonZero,
Ul: Unsigned + NonZero + Min<Ur>,
Ur: Unsigned + NonZero,
<Ul as Min<Ur>>::Output: Unsigned,
<Ul as Min<Ur>>::Output: NonZero,
type Output = PInt<<Ul as Min<Ur>>::Output>
The type of the minimum of Self
and Rhs
fn min(self, PInt<Ur>) -> <PInt<Ul> as Min<PInt<Ur>>>::Output
Method returning the minimum
impl<Ul, Ur> Rem<PInt<Ur>> for PInt<Ul> where
Ul: NonZero + Unsigned + Rem<Ur>,
Ur: NonZero + Unsigned,
PInt<Ul>: PrivateRem<<Ul as Rem<Ur>>::Output, PInt<Ur>>,
Ul: NonZero + Unsigned + Rem<Ur>,
Ur: NonZero + Unsigned,
PInt<Ul>: PrivateRem<<Ul as Rem<Ur>>::Output, PInt<Ur>>,
$A<Ul> % $B<Ur> = $R<Ul % Ur>
type Output = <PInt<Ul> as PrivateRem<<Ul as Rem<Ur>>::Output, PInt<Ur>>>::Output
fn rem(self, PInt<Ur>) -> <PInt<Ul> as Rem<PInt<Ur>>>::Output
impl<Ul, Ur> Rem<NInt<Ur>> for PInt<Ul> where
Ul: NonZero + Unsigned + Rem<Ur>,
Ur: NonZero + Unsigned,
PInt<Ul>: PrivateRem<<Ul as Rem<Ur>>::Output, NInt<Ur>>,
Ul: NonZero + Unsigned + Rem<Ur>,
Ur: NonZero + Unsigned,
PInt<Ul>: PrivateRem<<Ul as Rem<Ur>>::Output, NInt<Ur>>,
$A<Ul> % $B<Ur> = $R<Ul % Ur>
type Output = <PInt<Ul> as PrivateRem<<Ul as Rem<Ur>>::Output, NInt<Ur>>>::Output
fn rem(self, NInt<Ur>) -> <PInt<Ul> as Rem<NInt<Ur>>>::Output
impl<U> Integer for PInt<U> where
U: NonZero + Unsigned,
U: NonZero + Unsigned,
impl<Ul, Ur> Mul<NInt<Ur>> for PInt<Ul> where
Ul: NonZero + Unsigned + Mul<Ur>,
Ur: NonZero + Unsigned,
<Ul as Mul<Ur>>::Output: Unsigned,
<Ul as Mul<Ur>>::Output: NonZero,
Ul: NonZero + Unsigned + Mul<Ur>,
Ur: NonZero + Unsigned,
<Ul as Mul<Ur>>::Output: Unsigned,
<Ul as Mul<Ur>>::Output: NonZero,
P(Ul) * N(Ur) = N(Ul * Ur)
type Output = NInt<<Ul as Mul<Ur>>::Output>
The resulting type after applying the *
operator
fn mul(self, NInt<Ur>) -> <PInt<Ul> as Mul<NInt<Ur>>>::Output
The method for the *
operator
impl<Ul, Ur> Mul<PInt<Ur>> for PInt<Ul> where
Ul: NonZero + Unsigned + Mul<Ur>,
Ur: NonZero + Unsigned,
<Ul as Mul<Ur>>::Output: Unsigned,
<Ul as Mul<Ur>>::Output: NonZero,
Ul: NonZero + Unsigned + Mul<Ur>,
Ur: NonZero + Unsigned,
<Ul as Mul<Ur>>::Output: Unsigned,
<Ul as Mul<Ur>>::Output: NonZero,
P(Ul) * P(Ur) = P(Ul * Ur)
type Output = PInt<<Ul as Mul<Ur>>::Output>
The resulting type after applying the *
operator
fn mul(self, PInt<Ur>) -> <PInt<Ul> as Mul<PInt<Ur>>>::Output
The method for the *
operator
impl<V, A, U> Mul<TArr<V, A>> for PInt<U> where
U: Unsigned + NonZero,
PInt<U>: Mul<A>,
PInt<U>: Mul<V>,
U: Unsigned + NonZero,
PInt<U>: Mul<A>,
PInt<U>: Mul<V>,
type Output = TArr<<PInt<U> as Mul<V>>::Output, <PInt<U> as Mul<A>>::Output>
The resulting type after applying the *
operator
fn mul(self, TArr<V, A>) -> <PInt<U> as Mul<TArr<V, A>>>::Output
The method for the *
operator
impl<U> Mul<ATerm> for PInt<U> where
U: Unsigned + NonZero,
U: Unsigned + NonZero,
type Output = ATerm
The resulting type after applying the *
operator
fn mul(self, ATerm) -> <PInt<U> as Mul<ATerm>>::Output
The method for the *
operator
impl<U> Mul<Z0> for PInt<U> where
U: NonZero + Unsigned,
U: NonZero + Unsigned,
P * Z0 = Z0
type Output = Z0
The resulting type after applying the *
operator
fn mul(self, Z0) -> <PInt<U> as Mul<Z0>>::Output
The method for the *
operator
impl<Ul, Ur> Div<PInt<Ur>> for PInt<Ul> where
Ul: NonZero + Unsigned + Cmp<Ur>,
Ur: NonZero + Unsigned,
PInt<Ul>: PrivateDivInt<<Ul as Cmp<Ur>>::Output, PInt<Ur>>,
Ul: NonZero + Unsigned + Cmp<Ur>,
Ur: NonZero + Unsigned,
PInt<Ul>: PrivateDivInt<<Ul as Cmp<Ur>>::Output, PInt<Ur>>,
$A<Ul> / $B<Ur> = $R<Ul / Ur>
type Output = <PInt<Ul> as PrivateDivInt<<Ul as Cmp<Ur>>::Output, PInt<Ur>>>::Output
The resulting type after applying the /
operator
fn div(self, PInt<Ur>) -> <PInt<Ul> as Div<PInt<Ur>>>::Output
The method for the /
operator
impl<Ul, Ur> Div<NInt<Ur>> for PInt<Ul> where
Ul: NonZero + Unsigned + Cmp<Ur>,
Ur: NonZero + Unsigned,
PInt<Ul>: PrivateDivInt<<Ul as Cmp<Ur>>::Output, NInt<Ur>>,
Ul: NonZero + Unsigned + Cmp<Ur>,
Ur: NonZero + Unsigned,
PInt<Ul>: PrivateDivInt<<Ul as Cmp<Ur>>::Output, NInt<Ur>>,
$A<Ul> / $B<Ur> = $R<Ul / Ur>
type Output = <PInt<Ul> as PrivateDivInt<<Ul as Cmp<Ur>>::Output, NInt<Ur>>>::Output
The resulting type after applying the /
operator
fn div(self, NInt<Ur>) -> <PInt<Ul> as Div<NInt<Ur>>>::Output
The method for the /
operator
impl<U> Default for PInt<U> where
U: NonZero + Unsigned + Default,
U: NonZero + Unsigned + Default,
impl<U> NonZero for PInt<U> where
U: NonZero + Unsigned,
U: NonZero + Unsigned,
impl<U> PartialOrd<PInt<U>> for PInt<U> where
U: NonZero + Unsigned + PartialOrd<U>,
U: NonZero + Unsigned + PartialOrd<U>,
fn partial_cmp(&self, __arg_0: &PInt<U>) -> Option<Ordering>
fn lt(&self, __arg_0: &PInt<U>) -> bool
fn le(&self, __arg_0: &PInt<U>) -> bool
fn gt(&self, __arg_0: &PInt<U>) -> bool
fn ge(&self, __arg_0: &PInt<U>) -> bool
impl<U> Hash for PInt<U> where
U: NonZero + Unsigned + Hash,
U: NonZero + Unsigned + Hash,
impl<U> PartialEq<PInt<U>> for PInt<U> where
U: NonZero + Unsigned + PartialEq<U>,
U: NonZero + Unsigned + PartialEq<U>,
fn eq(&self, __arg_0: &PInt<U>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &PInt<U>) -> bool
This method tests for !=
.
impl<U> Max<Z0> for PInt<U> where
U: Unsigned + NonZero,
U: Unsigned + NonZero,
type Output = PInt<U>
The type of the maximum of Self
and Rhs
fn max(self, Z0) -> <PInt<U> as Max<Z0>>::Output
Method returning the maximum
impl<Ul, Ur> Max<PInt<Ur>> for PInt<Ul> where
Ul: Unsigned + NonZero + Max<Ur>,
Ur: Unsigned + NonZero,
<Ul as Max<Ur>>::Output: Unsigned,
<Ul as Max<Ur>>::Output: NonZero,
Ul: Unsigned + NonZero + Max<Ur>,
Ur: Unsigned + NonZero,
<Ul as Max<Ur>>::Output: Unsigned,
<Ul as Max<Ur>>::Output: NonZero,
type Output = PInt<<Ul as Max<Ur>>::Output>
The type of the maximum of Self
and Rhs
fn max(self, PInt<Ur>) -> <PInt<Ul> as Max<PInt<Ur>>>::Output
Method returning the maximum
impl<Ul, Ur> Max<NInt<Ur>> for PInt<Ul> where
Ul: Unsigned + NonZero,
Ur: Unsigned + NonZero,
Ul: Unsigned + NonZero,
Ur: Unsigned + NonZero,
type Output = PInt<Ul>
The type of the maximum of Self
and Rhs
fn max(self, NInt<Ur>) -> <PInt<Ul> as Max<NInt<Ur>>>::Output
Method returning the maximum
impl<U> Abs for PInt<U> where
U: NonZero + Unsigned,
U: NonZero + Unsigned,
impl<Ul, Ur> Sub<NInt<Ur>> for PInt<Ul> where
Ul: NonZero + Unsigned + Add<Ur>,
Ur: NonZero + Unsigned,
<Ul as Add<Ur>>::Output: Unsigned,
<Ul as Add<Ur>>::Output: NonZero,
Ul: NonZero + Unsigned + Add<Ur>,
Ur: NonZero + Unsigned,
<Ul as Add<Ur>>::Output: Unsigned,
<Ul as Add<Ur>>::Output: NonZero,
P(Ul) - N(Ur) = P(Ul + Ur)
type Output = PInt<<Ul as Add<Ur>>::Output>
The resulting type after applying the -
operator
fn sub(self, NInt<Ur>) -> <PInt<Ul> as Sub<NInt<Ur>>>::Output
The method for the -
operator
impl<U> Sub<Z0> for PInt<U> where
U: NonZero + Unsigned,
U: NonZero + Unsigned,
PInt - Z0 = PInt
type Output = PInt<U>
The resulting type after applying the -
operator
fn sub(self, Z0) -> <PInt<U> as Sub<Z0>>::Output
The method for the -
operator
impl<Ul, Ur> Sub<PInt<Ur>> for PInt<Ul> where
Ul: NonZero + Unsigned + Cmp<Ur> + PrivateIntegerAdd<<Ul as Cmp<Ur>>::Output, Ur>,
Ur: NonZero + Unsigned,
Ul: NonZero + Unsigned + Cmp<Ur> + PrivateIntegerAdd<<Ul as Cmp<Ur>>::Output, Ur>,
Ur: NonZero + Unsigned,
P(Ul) - P(Ur)
: We resolve this with our PrivateAdd
type Output = <Ul as PrivateIntegerAdd<<Ul as Cmp<Ur>>::Output, Ur>>::Output
The resulting type after applying the -
operator
fn sub(self, PInt<Ur>) -> <PInt<Ul> as Sub<PInt<Ur>>>::Output
The method for the -
operator
impl<U> Ord for PInt<U> where
U: NonZero + Unsigned + Ord,
U: NonZero + Unsigned + Ord,
impl<U> Copy for PInt<U> where
U: NonZero + Unsigned + Copy,
U: NonZero + Unsigned + Copy,