Expand description
Type-level signed integers with positive sign.
Implementations
Trait Implementations
sourceimpl<Ul, Ur> Add<NInt<Ur>> for PInt<Ul> where
Ul: Unsigned + NonZero + Cmp<Ur> + PrivateIntegerAdd<<Ul as Cmp<Ur>>::Output, Ur>,
Ur: Unsigned + NonZero,
impl<Ul, Ur> Add<NInt<Ur>> for PInt<Ul> where
Ul: Unsigned + NonZero + Cmp<Ur> + PrivateIntegerAdd<<Ul as Cmp<Ur>>::Output, Ur>,
Ur: Unsigned + NonZero,
P(Ul) + N(Ur)
: We resolve this with our PrivateAdd
sourceimpl<Ul, Ur> Add<PInt<Ur>> for PInt<Ul> where
Ul: Unsigned + NonZero + Add<Ur>,
Ur: Unsigned + NonZero,
<Ul as Add<Ur>>::Output: Unsigned,
<Ul as Add<Ur>>::Output: NonZero,
impl<Ul, Ur> Add<PInt<Ur>> for PInt<Ul> where
Ul: Unsigned + NonZero + Add<Ur>,
Ur: Unsigned + NonZero,
<Ul as Add<Ur>>::Output: Unsigned,
<Ul as Add<Ur>>::Output: NonZero,
P(Ul) + P(Ur) = P(Ul + Ur)
sourceimpl<Ul, Ur> Add<PInt<Ur>> for NInt<Ul> where
Ul: Unsigned + NonZero,
Ur: Unsigned + NonZero + Cmp<Ul> + PrivateIntegerAdd<<Ur as Cmp<Ul>>::Output, Ul>,
impl<Ul, Ur> Add<PInt<Ur>> for NInt<Ul> where
Ul: Unsigned + NonZero,
Ur: Unsigned + NonZero + Cmp<Ul> + PrivateIntegerAdd<<Ur as Cmp<Ul>>::Output, Ul>,
N(Ul) + P(Ur)
: We resolve this with our PrivateAdd
sourceimpl<P, N> Cmp<NInt<N>> for PInt<P> where
P: Unsigned + NonZero,
N: Unsigned + NonZero,
impl<P, N> Cmp<NInt<N>> for PInt<P> where
P: Unsigned + NonZero,
N: Unsigned + NonZero,
X > - Y
sourceimpl<P, N> Cmp<PInt<P>> for NInt<N> where
P: Unsigned + NonZero,
N: Unsigned + NonZero,
impl<P, N> Cmp<PInt<P>> for NInt<N> where
P: Unsigned + NonZero,
N: Unsigned + NonZero,
-X < Y
sourceimpl<Pl, Pr> Cmp<PInt<Pr>> for PInt<Pl> where
Pl: Cmp<Pr> + Unsigned + NonZero,
Pr: Unsigned + NonZero,
impl<Pl, Pr> Cmp<PInt<Pr>> for PInt<Pl> where
Pl: Cmp<Pr> + Unsigned + NonZero,
Pr: Unsigned + NonZero,
X <==> Y
sourceimpl<Ul, Ur> Div<NInt<Ur>> for PInt<Ul> where
Ul: Unsigned + NonZero + Cmp<Ur>,
Ur: Unsigned + NonZero,
PInt<Ul>: PrivateDivInt<<Ul as Cmp<Ur>>::Output, NInt<Ur>>,
impl<Ul, Ur> Div<NInt<Ur>> for PInt<Ul> where
Ul: Unsigned + NonZero + Cmp<Ur>,
Ur: Unsigned + NonZero,
PInt<Ul>: PrivateDivInt<<Ul as Cmp<Ur>>::Output, NInt<Ur>>,
$A<Ul> / $B<Ur> = $R<Ul / Ur>
sourceimpl<Ul, Ur> Div<PInt<Ur>> for PInt<Ul> where
Ul: Unsigned + NonZero + Cmp<Ur>,
Ur: Unsigned + NonZero,
PInt<Ul>: PrivateDivInt<<Ul as Cmp<Ur>>::Output, PInt<Ur>>,
impl<Ul, Ur> Div<PInt<Ur>> for PInt<Ul> where
Ul: Unsigned + NonZero + Cmp<Ur>,
Ur: Unsigned + NonZero,
PInt<Ul>: PrivateDivInt<<Ul as Cmp<Ur>>::Output, PInt<Ur>>,
$A<Ul> / $B<Ur> = $R<Ul / Ur>
sourceimpl<Ul, Ur> Div<PInt<Ur>> for NInt<Ul> where
Ul: Unsigned + NonZero + Cmp<Ur>,
Ur: Unsigned + NonZero,
NInt<Ul>: PrivateDivInt<<Ul as Cmp<Ur>>::Output, PInt<Ur>>,
impl<Ul, Ur> Div<PInt<Ur>> for NInt<Ul> where
Ul: Unsigned + NonZero + Cmp<Ur>,
Ur: Unsigned + NonZero,
NInt<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,
<U1 as Gcd<U2>>::Output: Unsigned,
<U1 as Gcd<U2>>::Output: NonZero,
impl<U1, U2> Gcd<NInt<U2>> for PInt<U1> where
U1: Unsigned + NonZero + Gcd<U2>,
U2: Unsigned + NonZero,
<U1 as Gcd<U2>>::Output: Unsigned,
<U1 as Gcd<U2>>::Output: NonZero,
sourceimpl<U1, U2> Gcd<PInt<U2>> for NInt<U1> where
U1: Unsigned + NonZero + Gcd<U2>,
U2: Unsigned + NonZero,
<U1 as Gcd<U2>>::Output: Unsigned,
<U1 as Gcd<U2>>::Output: NonZero,
impl<U1, U2> Gcd<PInt<U2>> for NInt<U1> where
U1: Unsigned + NonZero + Gcd<U2>,
U2: Unsigned + NonZero,
<U1 as Gcd<U2>>::Output: Unsigned,
<U1 as Gcd<U2>>::Output: NonZero,
sourceimpl<U1, U2> Gcd<PInt<U2>> for PInt<U1> where
U1: Unsigned + NonZero + Gcd<U2>,
U2: Unsigned + NonZero,
<U1 as Gcd<U2>>::Output: Unsigned,
<U1 as Gcd<U2>>::Output: NonZero,
impl<U1, U2> Gcd<PInt<U2>> for PInt<U1> where
U1: Unsigned + NonZero + Gcd<U2>,
U2: Unsigned + NonZero,
<U1 as Gcd<U2>>::Output: Unsigned,
<U1 as Gcd<U2>>::Output: NonZero,
sourceimpl<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,
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,
sourceimpl<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,
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,
sourceimpl<Ul, Ur> Mul<NInt<Ur>> for PInt<Ul> where
Ul: Unsigned + NonZero + Mul<Ur>,
Ur: Unsigned + NonZero,
<Ul as Mul<Ur>>::Output: Unsigned,
<Ul as Mul<Ur>>::Output: NonZero,
impl<Ul, Ur> Mul<NInt<Ur>> for PInt<Ul> where
Ul: Unsigned + NonZero + Mul<Ur>,
Ur: Unsigned + NonZero,
<Ul as Mul<Ur>>::Output: Unsigned,
<Ul as Mul<Ur>>::Output: NonZero,
P(Ul) * N(Ur) = N(Ul * Ur)
sourceimpl<Ul, Ur> Mul<PInt<Ur>> for NInt<Ul> where
Ul: Unsigned + NonZero + Mul<Ur>,
Ur: Unsigned + NonZero,
<Ul as Mul<Ur>>::Output: Unsigned,
<Ul as Mul<Ur>>::Output: NonZero,
impl<Ul, Ur> Mul<PInt<Ur>> for NInt<Ul> where
Ul: Unsigned + NonZero + Mul<Ur>,
Ur: Unsigned + NonZero,
<Ul as Mul<Ur>>::Output: Unsigned,
<Ul as Mul<Ur>>::Output: NonZero,
N(Ul) * P(Ur) = N(Ul * Ur)
sourceimpl<Ul, Ur> Mul<PInt<Ur>> for PInt<Ul> where
Ul: Unsigned + NonZero + Mul<Ur>,
Ur: Unsigned + NonZero,
<Ul as Mul<Ur>>::Output: Unsigned,
<Ul as Mul<Ur>>::Output: NonZero,
impl<Ul, Ur> Mul<PInt<Ur>> for PInt<Ul> where
Ul: Unsigned + NonZero + Mul<Ur>,
Ur: Unsigned + NonZero,
<Ul as Mul<Ur>>::Output: Unsigned,
<Ul as Mul<Ur>>::Output: 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>,
PInt<U>: Mul<V>,
impl<V, A, U> Mul<TArr<V, A>> for PInt<U> where
U: Unsigned + NonZero,
PInt<U>: Mul<A>,
PInt<U>: Mul<V>,
sourceimpl<U> Ord for PInt<U> where
U: Ord + Unsigned + NonZero,
impl<U> Ord for PInt<U> where
U: Ord + Unsigned + NonZero,
sourceimpl<U> PartialOrd<PInt<U>> for PInt<U> where
U: PartialOrd<U> + Unsigned + NonZero,
impl<U> PartialOrd<PInt<U>> for PInt<U> where
U: PartialOrd<U> + Unsigned + NonZero,
sourcepub fn partial_cmp(&self, other: &PInt<U>) -> Option<Ordering>
pub fn partial_cmp(&self, other: &PInt<U>) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
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 more
sourceimpl<Ul, Ur> Pow<PInt<UInt<Ur, B0>>> for NInt<Ul> where
Ul: Unsigned + NonZero + Pow<UInt<Ur, B0>>,
Ur: Unsigned,
<Ul as Pow<UInt<Ur, B0>>>::Output: Unsigned,
<Ul as Pow<UInt<Ur, B0>>>::Output: NonZero,
impl<Ul, Ur> Pow<PInt<UInt<Ur, B0>>> for NInt<Ul> where
Ul: Unsigned + NonZero + Pow<UInt<Ur, B0>>,
Ur: Unsigned,
<Ul as Pow<UInt<Ur, B0>>>::Output: Unsigned,
<Ul as Pow<UInt<Ur, B0>>>::Output: NonZero,
N(Ul)^P(Ur) = P(Ul^Ur) if Ur is even
sourceimpl<Ul, Ur> Pow<PInt<UInt<Ur, B1>>> for NInt<Ul> where
Ul: Unsigned + NonZero + Pow<UInt<Ur, B1>>,
Ur: Unsigned,
<Ul as Pow<UInt<Ur, B1>>>::Output: Unsigned,
<Ul as Pow<UInt<Ur, B1>>>::Output: NonZero,
impl<Ul, Ur> Pow<PInt<UInt<Ur, B1>>> for NInt<Ul> where
Ul: Unsigned + NonZero + Pow<UInt<Ur, B1>>,
Ur: Unsigned,
<Ul as Pow<UInt<Ur, B1>>>::Output: Unsigned,
<Ul as Pow<UInt<Ur, B1>>>::Output: NonZero,
N(Ul)^P(Ur) = N(Ul^Ur) if Ur is odd
sourceimpl<Ul, Ur> Pow<PInt<Ur>> for PInt<Ul> where
Ul: Unsigned + NonZero + Pow<Ur>,
Ur: Unsigned + NonZero,
<Ul as Pow<Ur>>::Output: Unsigned,
<Ul as Pow<Ur>>::Output: NonZero,
impl<Ul, Ur> Pow<PInt<Ur>> for PInt<Ul> where
Ul: Unsigned + NonZero + Pow<Ur>,
Ur: Unsigned + NonZero,
<Ul as Pow<Ur>>::Output: Unsigned,
<Ul as Pow<Ur>>::Output: NonZero,
P(Ul)^P(Ur) = P(Ul^Ur)
sourceimpl<Ul, Ur> Rem<NInt<Ur>> for PInt<Ul> where
Ul: Unsigned + NonZero + Rem<Ur>,
Ur: Unsigned + NonZero,
PInt<Ul>: PrivateRem<<Ul as Rem<Ur>>::Output, NInt<Ur>>,
impl<Ul, Ur> Rem<NInt<Ur>> for PInt<Ul> where
Ul: Unsigned + NonZero + Rem<Ur>,
Ur: Unsigned + NonZero,
PInt<Ul>: PrivateRem<<Ul as Rem<Ur>>::Output, NInt<Ur>>,
$A<Ul> % $B<Ur> = $R<Ul % Ur>
sourceimpl<Ul, Ur> Rem<PInt<Ur>> for NInt<Ul> where
Ul: Unsigned + NonZero + Rem<Ur>,
Ur: Unsigned + NonZero,
NInt<Ul>: PrivateRem<<Ul as Rem<Ur>>::Output, PInt<Ur>>,
impl<Ul, Ur> Rem<PInt<Ur>> for NInt<Ul> where
Ul: Unsigned + NonZero + Rem<Ur>,
Ur: Unsigned + NonZero,
NInt<Ul>: PrivateRem<<Ul as Rem<Ur>>::Output, PInt<Ur>>,
$A<Ul> % $B<Ur> = $R<Ul % Ur>
sourceimpl<Ul, Ur> Rem<PInt<Ur>> for PInt<Ul> where
Ul: Unsigned + NonZero + Rem<Ur>,
Ur: Unsigned + NonZero,
PInt<Ul>: PrivateRem<<Ul as Rem<Ur>>::Output, PInt<Ur>>,
impl<Ul, Ur> Rem<PInt<Ur>> for PInt<Ul> where
Ul: Unsigned + NonZero + Rem<Ur>,
Ur: Unsigned + NonZero,
PInt<Ul>: PrivateRem<<Ul as Rem<Ur>>::Output, PInt<Ur>>,
$A<Ul> % $B<Ur> = $R<Ul % Ur>
sourceimpl<Ul, Ur> Sub<NInt<Ur>> for PInt<Ul> where
Ul: Unsigned + NonZero + Add<Ur>,
Ur: Unsigned + NonZero,
<Ul as Add<Ur>>::Output: Unsigned,
<Ul as Add<Ur>>::Output: NonZero,
impl<Ul, Ur> Sub<NInt<Ur>> for PInt<Ul> where
Ul: Unsigned + NonZero + Add<Ur>,
Ur: Unsigned + NonZero,
<Ul as Add<Ur>>::Output: Unsigned,
<Ul as Add<Ur>>::Output: NonZero,
P(Ul) - N(Ur) = P(Ul + Ur)
sourceimpl<Ul, Ur> Sub<PInt<Ur>> for PInt<Ul> where
Ul: Unsigned + NonZero + Cmp<Ur> + PrivateIntegerAdd<<Ul as Cmp<Ur>>::Output, Ur>,
Ur: Unsigned + NonZero,
impl<Ul, Ur> Sub<PInt<Ur>> for PInt<Ul> where
Ul: Unsigned + NonZero + Cmp<Ur> + PrivateIntegerAdd<<Ul as Cmp<Ur>>::Output, Ur>,
Ur: Unsigned + NonZero,
P(Ul) - P(Ur)
: We resolve this with our PrivateAdd
sourceimpl<Ul, Ur> Sub<PInt<Ur>> for NInt<Ul> where
Ul: Unsigned + NonZero + Add<Ur>,
Ur: Unsigned + NonZero,
<Ul as Add<Ur>>::Output: Unsigned,
<Ul as Add<Ur>>::Output: NonZero,
impl<Ul, Ur> Sub<PInt<Ur>> for NInt<Ul> where
Ul: Unsigned + NonZero + Add<Ur>,
Ur: Unsigned + NonZero,
<Ul as Add<Ur>>::Output: Unsigned,
<Ul as Add<Ur>>::Output: NonZero,
N(Ul) - P(Ur) = N(Ul + Ur)
impl<U> Copy for PInt<U> where
U: Copy + Unsigned + NonZero,
impl<U> Eq for PInt<U> where
U: Eq + Unsigned + NonZero,
impl<U> NonZero for PInt<U> where
U: Unsigned + NonZero,
impl<U> PowerOfTwo for PInt<U> where
U: Unsigned + NonZero + PowerOfTwo,
impl<U> StructuralEq for PInt<U> where
U: Unsigned + NonZero,
impl<U> StructuralPartialEq for PInt<U> where
U: Unsigned + NonZero,
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 T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> CallHasher for T where
T: Hash + ?Sized,
impl<T> CallHasher for T where
T: Hash + ?Sized,
sourceimpl<M, N> PartialDiv<N> for M where
M: Integer + Div<N> + Rem<N, Output = Z0>,
impl<M, N> PartialDiv<N> for M where
M: Integer + Div<N> + Rem<N, Output = Z0>,
sourcepub fn partial_div(self, rhs: N) -> <M as PartialDiv<N>>::Output
pub fn partial_div(self, rhs: N) -> <M as PartialDiv<N>>::Output
Method for performing the division
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more