Expand description
Type-level signed integers with positive sign.
Implementations
Trait Implementations
sourceimpl<Ul: Unsigned + NonZero, Ur: Unsigned + NonZero> Add<NInt<Ur>> for PInt<Ul>where
Ul: Cmp<Ur> + PrivateIntegerAdd<<Ul as Cmp<Ur>>::Output, Ur>,
impl<Ul: Unsigned + NonZero, Ur: Unsigned + NonZero> Add<NInt<Ur>> for PInt<Ul>where
Ul: Cmp<Ur> + PrivateIntegerAdd<<Ul as Cmp<Ur>>::Output, Ur>,
P(Ul) + N(Ur)
: We resolve this with our PrivateAdd
sourceimpl<Ul: Unsigned + NonZero, Ur: Unsigned + NonZero> Add<PInt<Ur>> for NInt<Ul>where
Ur: Cmp<Ul> + PrivateIntegerAdd<<Ur as Cmp<Ul>>::Output, Ul>,
impl<Ul: Unsigned + NonZero, Ur: Unsigned + NonZero> Add<PInt<Ur>> for NInt<Ul>where
Ur: Cmp<Ul> + PrivateIntegerAdd<<Ur as Cmp<Ul>>::Output, Ul>,
N(Ul) + P(Ur)
: We resolve this with our PrivateAdd
sourceimpl<Ul: Unsigned + NonZero, Ur: Unsigned + NonZero> Add<PInt<Ur>> for PInt<Ul>where
Ul: Add<Ur>,
<Ul as Add<Ur>>::Output: Unsigned + NonZero,
impl<Ul: Unsigned + NonZero, Ur: Unsigned + NonZero> Add<PInt<Ur>> for PInt<Ul>where
Ul: Add<Ur>,
<Ul as Add<Ur>>::Output: Unsigned + NonZero,
P(Ul) + P(Ur) = P(Ul + Ur)
sourceimpl<Pl: Cmp<Pr> + Unsigned + NonZero, Pr: Unsigned + NonZero> Cmp<PInt<Pr>> for PInt<Pl>
impl<Pl: Cmp<Pr> + Unsigned + NonZero, Pr: Unsigned + NonZero> Cmp<PInt<Pr>> for PInt<Pl>
X <==> Y
sourceimpl<Ul: Unsigned + NonZero, Ur: Unsigned + NonZero> Div<NInt<Ur>> for PInt<Ul>where
Ul: Cmp<Ur>,
PInt<Ul>: PrivateDivInt<<Ul as Cmp<Ur>>::Output, NInt<Ur>>,
impl<Ul: Unsigned + NonZero, Ur: Unsigned + NonZero> Div<NInt<Ur>> for PInt<Ul>where
Ul: Cmp<Ur>,
PInt<Ul>: PrivateDivInt<<Ul as Cmp<Ur>>::Output, NInt<Ur>>,
$A<Ul> / $B<Ur> = $R<Ul / Ur>
sourceimpl<Ul: Unsigned + NonZero, Ur: Unsigned + NonZero> Div<PInt<Ur>> for NInt<Ul>where
Ul: Cmp<Ur>,
NInt<Ul>: PrivateDivInt<<Ul as Cmp<Ur>>::Output, PInt<Ur>>,
impl<Ul: Unsigned + NonZero, Ur: Unsigned + NonZero> Div<PInt<Ur>> for NInt<Ul>where
Ul: Cmp<Ur>,
NInt<Ul>: PrivateDivInt<<Ul as Cmp<Ur>>::Output, PInt<Ur>>,
$A<Ul> / $B<Ur> = $R<Ul / Ur>
sourceimpl<Ul: Unsigned + NonZero, Ur: Unsigned + NonZero> Div<PInt<Ur>> for PInt<Ul>where
Ul: Cmp<Ur>,
PInt<Ul>: PrivateDivInt<<Ul as Cmp<Ur>>::Output, PInt<Ur>>,
impl<Ul: Unsigned + NonZero, Ur: Unsigned + NonZero> Div<PInt<Ur>> for PInt<Ul>where
Ul: Cmp<Ur>,
PInt<Ul>: PrivateDivInt<<Ul as Cmp<Ur>>::Output, PInt<Ur>>,
$A<Ul> / $B<Ur> = $R<Ul / Ur>
sourceimpl<U1, U2> Gcd<NInt<U2>> for PInt<U1>where
U1: Unsigned + NonZero + Gcd<U2>,
U2: Unsigned + NonZero,
Gcf<U1, U2>: Unsigned + NonZero,
impl<U1, U2> Gcd<NInt<U2>> for PInt<U1>where
U1: Unsigned + NonZero + Gcd<U2>,
U2: Unsigned + NonZero,
Gcf<U1, U2>: Unsigned + NonZero,
sourceimpl<U1, U2> Gcd<PInt<U2>> for NInt<U1>where
U1: Unsigned + NonZero + Gcd<U2>,
U2: Unsigned + NonZero,
Gcf<U1, U2>: Unsigned + NonZero,
impl<U1, U2> Gcd<PInt<U2>> for NInt<U1>where
U1: Unsigned + NonZero + Gcd<U2>,
U2: Unsigned + NonZero,
Gcf<U1, U2>: Unsigned + NonZero,
sourceimpl<U1, U2> Gcd<PInt<U2>> for PInt<U1>where
U1: Unsigned + NonZero + Gcd<U2>,
U2: Unsigned + NonZero,
Gcf<U1, U2>: Unsigned + NonZero,
impl<U1, U2> Gcd<PInt<U2>> for PInt<U1>where
U1: Unsigned + NonZero + Gcd<U2>,
U2: Unsigned + NonZero,
Gcf<U1, U2>: Unsigned + NonZero,
sourceimpl<Ul, Ur> Max<PInt<Ur>> for PInt<Ul>where
Ul: Unsigned + NonZero + Max<Ur>,
Ur: Unsigned + NonZero,
Maximum<Ul, Ur>: Unsigned + NonZero,
impl<Ul, Ur> Max<PInt<Ur>> for PInt<Ul>where
Ul: Unsigned + NonZero + Max<Ur>,
Ur: Unsigned + NonZero,
Maximum<Ul, Ur>: Unsigned + NonZero,
sourceimpl<Ul, Ur> Min<PInt<Ur>> for PInt<Ul>where
Ul: Unsigned + NonZero + Min<Ur>,
Ur: Unsigned + NonZero,
Minimum<Ul, Ur>: Unsigned + NonZero,
impl<Ul, Ur> Min<PInt<Ur>> for PInt<Ul>where
Ul: Unsigned + NonZero + Min<Ur>,
Ur: Unsigned + NonZero,
Minimum<Ul, Ur>: Unsigned + NonZero,
sourceimpl<Ul: Unsigned + NonZero, Ur: Unsigned + NonZero> Mul<NInt<Ur>> for PInt<Ul>where
Ul: Mul<Ur>,
<Ul as Mul<Ur>>::Output: Unsigned + NonZero,
impl<Ul: Unsigned + NonZero, Ur: Unsigned + NonZero> Mul<NInt<Ur>> for PInt<Ul>where
Ul: Mul<Ur>,
<Ul as Mul<Ur>>::Output: Unsigned + NonZero,
P(Ul) * N(Ur) = N(Ul * Ur)
sourceimpl<Ul: Unsigned + NonZero, Ur: Unsigned + NonZero> Mul<PInt<Ur>> for NInt<Ul>where
Ul: Mul<Ur>,
<Ul as Mul<Ur>>::Output: Unsigned + NonZero,
impl<Ul: Unsigned + NonZero, Ur: Unsigned + NonZero> Mul<PInt<Ur>> for NInt<Ul>where
Ul: Mul<Ur>,
<Ul as Mul<Ur>>::Output: Unsigned + NonZero,
N(Ul) * P(Ur) = N(Ul * Ur)
sourceimpl<Ul: Unsigned + NonZero, Ur: Unsigned + NonZero> Mul<PInt<Ur>> for PInt<Ul>where
Ul: Mul<Ur>,
<Ul as Mul<Ur>>::Output: Unsigned + NonZero,
impl<Ul: Unsigned + NonZero, Ur: Unsigned + NonZero> Mul<PInt<Ur>> for PInt<Ul>where
Ul: Mul<Ur>,
<Ul as Mul<Ur>>::Output: Unsigned + NonZero,
P(Ul) * P(Ur) = P(Ul * Ur)
sourceimpl<V, A, U> Mul<TArr<V, A>> for PInt<U>where
U: Unsigned + NonZero,
PInt<U>: Mul<A> + Mul<V>,
impl<V, A, U> Mul<TArr<V, A>> for PInt<U>where
U: Unsigned + NonZero,
PInt<U>: Mul<A> + Mul<V>,
sourceimpl<U: Ord + Unsigned + NonZero> Ord for PInt<U>
impl<U: Ord + Unsigned + NonZero> Ord for PInt<U>
1.21.0 · sourcefn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl<U: PartialEq + Unsigned + NonZero> PartialEq<PInt<U>> for PInt<U>
impl<U: PartialEq + Unsigned + NonZero> PartialEq<PInt<U>> for PInt<U>
sourceimpl<U: PartialOrd + Unsigned + NonZero> PartialOrd<PInt<U>> for PInt<U>
impl<U: PartialOrd + Unsigned + NonZero> PartialOrd<PInt<U>> for PInt<U>
sourcefn partial_cmp(&self, other: &PInt<U>) -> Option<Ordering>
fn partial_cmp(&self, other: &PInt<U>) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresourceimpl<Ul: Unsigned + NonZero, Ur: Unsigned> Pow<PInt<UInt<Ur, B0>>> for NInt<Ul>where
Ul: Pow<UInt<Ur, B0>>,
<Ul as Pow<UInt<Ur, B0>>>::Output: Unsigned + NonZero,
impl<Ul: Unsigned + NonZero, Ur: Unsigned> Pow<PInt<UInt<Ur, B0>>> for NInt<Ul>where
Ul: Pow<UInt<Ur, B0>>,
<Ul as Pow<UInt<Ur, B0>>>::Output: Unsigned + NonZero,
N(Ul)^P(Ur) = P(Ul^Ur) if Ur is even
sourceimpl<Ul: Unsigned + NonZero, Ur: Unsigned> Pow<PInt<UInt<Ur, B1>>> for NInt<Ul>where
Ul: Pow<UInt<Ur, B1>>,
<Ul as Pow<UInt<Ur, B1>>>::Output: Unsigned + NonZero,
impl<Ul: Unsigned + NonZero, Ur: Unsigned> Pow<PInt<UInt<Ur, B1>>> for NInt<Ul>where
Ul: Pow<UInt<Ur, B1>>,
<Ul as Pow<UInt<Ur, B1>>>::Output: Unsigned + NonZero,
N(Ul)^P(Ur) = N(Ul^Ur) if Ur is odd
sourceimpl<Ul: Unsigned + NonZero, Ur: Unsigned + NonZero> Pow<PInt<Ur>> for PInt<Ul>where
Ul: Pow<Ur>,
<Ul as Pow<Ur>>::Output: Unsigned + NonZero,
impl<Ul: Unsigned + NonZero, Ur: Unsigned + NonZero> Pow<PInt<Ur>> for PInt<Ul>where
Ul: Pow<Ur>,
<Ul as Pow<Ur>>::Output: Unsigned + NonZero,
P(Ul)^P(Ur) = P(Ul^Ur)
sourceimpl<Ul: Unsigned + NonZero, Ur: Unsigned + NonZero> Rem<NInt<Ur>> for PInt<Ul>where
Ul: Rem<Ur>,
PInt<Ul>: PrivateRem<<Ul as Rem<Ur>>::Output, NInt<Ur>>,
impl<Ul: Unsigned + NonZero, Ur: Unsigned + NonZero> Rem<NInt<Ur>> for PInt<Ul>where
Ul: Rem<Ur>,
PInt<Ul>: PrivateRem<<Ul as Rem<Ur>>::Output, NInt<Ur>>,
$A<Ul> % $B<Ur> = $R<Ul % Ur>
sourceimpl<Ul: Unsigned + NonZero, Ur: Unsigned + NonZero> Rem<PInt<Ur>> for NInt<Ul>where
Ul: Rem<Ur>,
NInt<Ul>: PrivateRem<<Ul as Rem<Ur>>::Output, PInt<Ur>>,
impl<Ul: Unsigned + NonZero, Ur: Unsigned + NonZero> Rem<PInt<Ur>> for NInt<Ul>where
Ul: Rem<Ur>,
NInt<Ul>: PrivateRem<<Ul as Rem<Ur>>::Output, PInt<Ur>>,
$A<Ul> % $B<Ur> = $R<Ul % Ur>
sourceimpl<Ul: Unsigned + NonZero, Ur: Unsigned + NonZero> Rem<PInt<Ur>> for PInt<Ul>where
Ul: Rem<Ur>,
PInt<Ul>: PrivateRem<<Ul as Rem<Ur>>::Output, PInt<Ur>>,
impl<Ul: Unsigned + NonZero, Ur: Unsigned + NonZero> Rem<PInt<Ur>> for PInt<Ul>where
Ul: Rem<Ur>,
PInt<Ul>: PrivateRem<<Ul as Rem<Ur>>::Output, PInt<Ur>>,
$A<Ul> % $B<Ur> = $R<Ul % Ur>
sourceimpl<Ul: Unsigned + NonZero, Ur: Unsigned + NonZero> Sub<NInt<Ur>> for PInt<Ul>where
Ul: Add<Ur>,
<Ul as Add<Ur>>::Output: Unsigned + NonZero,
impl<Ul: Unsigned + NonZero, Ur: Unsigned + NonZero> Sub<NInt<Ur>> for PInt<Ul>where
Ul: Add<Ur>,
<Ul as Add<Ur>>::Output: Unsigned + NonZero,
P(Ul) - N(Ur) = P(Ul + Ur)
sourceimpl<Ul: Unsigned + NonZero, Ur: Unsigned + NonZero> Sub<PInt<Ur>> for NInt<Ul>where
Ul: Add<Ur>,
<Ul as Add<Ur>>::Output: Unsigned + NonZero,
impl<Ul: Unsigned + NonZero, Ur: Unsigned + NonZero> Sub<PInt<Ur>> for NInt<Ul>where
Ul: Add<Ur>,
<Ul as Add<Ur>>::Output: Unsigned + NonZero,
N(Ul) - P(Ur) = N(Ul + Ur)
sourceimpl<Ul: Unsigned + NonZero, Ur: Unsigned + NonZero> Sub<PInt<Ur>> for PInt<Ul>where
Ul: Cmp<Ur> + PrivateIntegerAdd<<Ul as Cmp<Ur>>::Output, Ur>,
impl<Ul: Unsigned + NonZero, Ur: Unsigned + NonZero> Sub<PInt<Ur>> for PInt<Ul>where
Ul: Cmp<Ur> + PrivateIntegerAdd<<Ul as Cmp<Ur>>::Output, Ur>,
P(Ul) - P(Ur)
: We resolve this with our PrivateAdd
impl<U: Copy + Unsigned + NonZero> Copy for PInt<U>
impl<U: Eq + Unsigned + NonZero> Eq for PInt<U>
impl<U: Unsigned + NonZero> NonZero for PInt<U>
impl<U: Unsigned + NonZero + PowerOfTwo> PowerOfTwo for PInt<U>
impl<U: Unsigned + NonZero> StructuralEq for PInt<U>
impl<U: Unsigned + NonZero> StructuralPartialEq for PInt<U>
Auto Trait Implementations
impl<U> RefUnwindSafe for PInt<U>where
U: RefUnwindSafe,
impl<U> Send for PInt<U>where
U: Send,
impl<U> Sync for PInt<U>where
U: Sync,
impl<U> Unpin for PInt<U>where
U: Unpin,
impl<U> UnwindSafe for PInt<U>where
U: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<M, N> PartialDiv<N> for Mwhere
M: Integer + Div<N> + Rem<N, Output = Z0>,
impl<M, N> PartialDiv<N> for Mwhere
M: Integer + Div<N> + Rem<N, Output = Z0>,
sourcefn partial_div(self, rhs: N) -> <M as PartialDiv<N>>::Output
fn partial_div(self, rhs: N) -> <M as PartialDiv<N>>::Output
Method for performing the division