Expand description
Type-level signed integers with negative 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<NInt<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> Add<NInt<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) + N(Ur) = N(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<Nl, Nr> Cmp<NInt<Nr>> for NInt<Nl> where
Nl: Unsigned + NonZero,
Nr: Cmp<Nl> + Unsigned + NonZero,
impl<Nl, Nr> Cmp<NInt<Nr>> for NInt<Nl> where
Nl: Unsigned + NonZero,
Nr: Cmp<Nl> + 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<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<NInt<Ur>> for NInt<Ul> where
Ul: Unsigned + NonZero + Cmp<Ur>,
Ur: Unsigned + NonZero,
NInt<Ul>: PrivateDivInt<<Ul as Cmp<Ur>>::Output, NInt<Ur>>,
impl<Ul, Ur> Div<NInt<Ur>> for NInt<Ul> where
Ul: Unsigned + NonZero + Cmp<Ur>,
Ur: Unsigned + NonZero,
NInt<Ul>: PrivateDivInt<<Ul as Cmp<Ur>>::Output, NInt<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 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<NInt<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<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<Ul, Ur> Max<NInt<Ur>> for NInt<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> Max<NInt<Ur>> for NInt<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> Min<NInt<Ur>> for NInt<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> Min<NInt<Ur>> for NInt<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> 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<NInt<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<NInt<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) * N(Ur) = P(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<V, A, U> Mul<TArr<V, A>> for NInt<U> where
U: Unsigned + NonZero,
NInt<U>: Mul<A>,
NInt<U>: Mul<V>,
impl<V, A, U> Mul<TArr<V, A>> for NInt<U> where
U: Unsigned + NonZero,
NInt<U>: Mul<A>,
NInt<U>: Mul<V>,
sourceimpl<U> Ord for NInt<U> where
U: Ord + Unsigned + NonZero,
impl<U> Ord for NInt<U> where
U: Ord + Unsigned + NonZero,
sourceimpl<U> PartialOrd<NInt<U>> for NInt<U> where
U: PartialOrd<U> + Unsigned + NonZero,
impl<U> PartialOrd<NInt<U>> for NInt<U> where
U: PartialOrd<U> + Unsigned + NonZero,
sourcepub fn partial_cmp(&self, other: &NInt<U>) -> Option<Ordering>
pub fn partial_cmp(&self, other: &NInt<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<U> Pow<NInt<UInt<U, B0>>> for NInt<UInt<UTerm, B1>> where
U: Unsigned,
impl<U> Pow<NInt<UInt<U, B0>>> for NInt<UInt<UTerm, B1>> where
U: Unsigned,
(-1)^N = 1 if N is even
sourceimpl<U> Pow<NInt<UInt<U, B1>>> for NInt<UInt<UTerm, B1>> where
U: Unsigned,
impl<U> Pow<NInt<UInt<U, B1>>> for NInt<UInt<UTerm, B1>> where
U: Unsigned,
(-1)^N = -1 if N is odd
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> Rem<NInt<Ur>> for NInt<Ul> where
Ul: Unsigned + NonZero + Rem<Ur>,
Ur: Unsigned + NonZero,
NInt<Ul>: PrivateRem<<Ul as Rem<Ur>>::Output, NInt<Ur>>,
impl<Ul, Ur> Rem<NInt<Ur>> for NInt<Ul> where
Ul: Unsigned + NonZero + Rem<Ur>,
Ur: Unsigned + NonZero,
NInt<Ul>: PrivateRem<<Ul as Rem<Ur>>::Output, NInt<Ur>>,
$A<Ul> % $B<Ur> = $R<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> 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<NInt<Ur>> for NInt<Ul> where
Ul: Unsigned + NonZero,
Ur: Unsigned + NonZero + Cmp<Ul> + PrivateIntegerAdd<<Ur as Cmp<Ul>>::Output, Ul>,
impl<Ul, Ur> Sub<NInt<Ur>> for NInt<Ul> where
Ul: Unsigned + NonZero,
Ur: Unsigned + NonZero + Cmp<Ul> + PrivateIntegerAdd<<Ur as Cmp<Ul>>::Output, Ul>,
N(Ul) - N(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 NInt<U> where
U: Copy + Unsigned + NonZero,
impl<U> Eq for NInt<U> where
U: Eq + Unsigned + NonZero,
impl<U> NonZero for NInt<U> where
U: Unsigned + NonZero,
impl<U> StructuralEq for NInt<U> where
U: Unsigned + NonZero,
impl<U> StructuralPartialEq for NInt<U> where
U: Unsigned + NonZero,
Auto Trait Implementations
impl<U> RefUnwindSafe for NInt<U> where
U: RefUnwindSafe,
impl<U> Send for NInt<U> where
U: Send,
impl<U> Sync for NInt<U> where
U: Sync,
impl<U> Unpin for NInt<U> where
U: Unpin,
impl<U> UnwindSafe for NInt<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