Struct typenum::int::PInt
[−]
[src]
pub struct PInt<U: Unsigned + NonZero> { // some fields omitted }
Type-level signed integers with positive sign.
Trait Implementations
impl<U: Unsigned + NonZero> NonZero for PInt<U>
impl<U: Unsigned + NonZero> Integer for PInt<U>
impl<U: Unsigned + NonZero> Neg for PInt<U>
-PInt = NInt
impl<U: Unsigned + NonZero> Add<Z0> for PInt<U>
PInt + Z0 = PInt
impl<Ul: Unsigned + NonZero, Ur: Unsigned + NonZero> Add<PInt<Ur>> for PInt<Ul> where Ul: Add<Ur>, Ul::Output: Unsigned + NonZero
P(Ul) + P(Ur) = P(Ul + Ur)
impl<Ul: Unsigned + NonZero, Ur: Unsigned + NonZero> Add<NInt<Ur>> for PInt<Ul> where Ul: Cmp<Ur> + PrivateIntegerAdd<Ul::Output, Ur>
P(Ul) + N(Ur)
: We resolve this with our PrivateAdd
impl<U: Unsigned + NonZero> Sub<Z0> for PInt<U>
PInt - Z0 = PInt
impl<Ul: Unsigned + NonZero, Ur: Unsigned + NonZero> Sub<NInt<Ur>> for PInt<Ul> where Ul: Add<Ur>, Ul::Output: Unsigned + NonZero
P(Ul) - N(Ur) = P(Ul + Ur)
impl<Ul: Unsigned + NonZero, Ur: Unsigned + NonZero> Sub<PInt<Ur>> for PInt<Ul> where Ul: Cmp<Ur> + PrivateIntegerAdd<Ul::Output, Ur>
P(Ul) - P(Ur)
: We resolve this with our PrivateAdd
impl<U: Unsigned + NonZero> Mul<Z0> for PInt<U>
P * Z0 = Z0
impl<Ul: Unsigned + NonZero, Ur: Unsigned + NonZero> Mul<PInt<Ur>> for PInt<Ul> where Ul: Mul<Ur>, Ul::Output: Unsigned + NonZero
P(Ul) * P(Ur) = P(Ul * Ur)
impl<Ul: Unsigned + NonZero, Ur: Unsigned + NonZero> Mul<NInt<Ur>> for PInt<Ul> where Ul: Mul<Ur>, Ul::Output: Unsigned + NonZero
P(Ul) * N(Ur) = N(Ul * Ur)
impl<Ul: Unsigned + NonZero, Ur: Unsigned + NonZero> Div<PInt<Ur>> for PInt<Ul> where Ul: Cmp<Ur>, PInt<Ul>: PrivateDivInt<Ul::Output, PInt<Ur>>
$A<Ul> / $B<Ur> = $R<Ul / Ur>
impl<Ul: Unsigned + NonZero, Ur: Unsigned + NonZero> Div<NInt<Ur>> for PInt<Ul> where Ul: Cmp<Ur>, PInt<Ul>: PrivateDivInt<Ul::Output, NInt<Ur>>
$A<Ul> / $B<Ur> = $R<Ul / Ur>
impl<U: Unsigned + NonZero> Cmp<Z0> for PInt<U>
X > 0
type Output = Greater
impl<P: Unsigned + NonZero, N: Unsigned + NonZero> Cmp<NInt<N>> for PInt<P>
X > - Y
type Output = Greater
impl<Pl: Cmp<Pr> + Unsigned + NonZero, Pr: Unsigned + NonZero> Cmp<PInt<Pr>> for PInt<Pl>
X <==> Y
type Output = Pl::Output
impl<Ul: Unsigned + NonZero, Ur: Unsigned + NonZero> Rem<PInt<Ur>> for PInt<Ul> where Ul: Rem<Ur>, PInt<Ul>: PrivateRem<Ul::Output, PInt<Ur>>
$A<Ul> % $B<Ur> = $R<Ul % Ur>
impl<Ul: Unsigned + NonZero, Ur: Unsigned + NonZero> Rem<NInt<Ur>> for PInt<Ul> where Ul: Rem<Ur>, PInt<Ul>: PrivateRem<Ul::Output, NInt<Ur>>
$A<Ul> % $B<Ur> = $R<Ul % Ur>
impl<U: Unsigned + NonZero> Pow<Z0> for PInt<U>
P0 = 1
type Output = P1
impl<Ul: Unsigned + NonZero, Ur: Unsigned + NonZero> Pow<PInt<Ur>> for PInt<Ul> where Ul: Pow<Ur>, Ul::Output: Unsigned + NonZero
P(Ul)P(Ur) = P(UlUr)