Struct crypto::ciphers::traits::consts::int::NInt [−]
Type-level signed integers with negative sign.
Implementations
Trait Implementations
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,
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)
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,
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
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>,
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
impl<U> Clone for NInt<U> where
U: Clone + Unsigned + NonZero,
impl<U> Clone for NInt<U> where
U: Clone + Unsigned + NonZero,
pub fn clone(&self) -> NInt<U>
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<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
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>>,
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>
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>>,
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>
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>>,
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>
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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)
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,
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)
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,
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)
impl<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>,
impl<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,
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,
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
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,
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
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>>,
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>
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>>,
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>
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>>,
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>
impl<U> StructuralEq 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,
impl<U> StructuralPartialEq for NInt<U> where
U: Unsigned + NonZero,
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>,
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
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,
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)
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,
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)
Auto Trait Implementations
impl<U> RefUnwindSafe for NInt<U> where
U: RefUnwindSafe,
impl<U> RefUnwindSafe for NInt<U> where
U: RefUnwindSafe,
impl<U> UnwindSafe for NInt<U> where
U: UnwindSafe,
impl<U> UnwindSafe for NInt<U> where
U: UnwindSafe,
Blanket Implementations
impl<T, Rhs, Output> NumOps<Rhs, Output> for T where
T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>,
[src]
impl<T, Rhs, Output> NumOps<Rhs, Output> for T where
T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>,
[src]impl<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>,
type Output = <M as Div<N>>::Output
The type of the result of the division