PrivateIntegerAdd

Trait PrivateIntegerAdd 

Source
pub trait PrivateIntegerAdd<C, N> {
    type Output;

    // Required method
    fn private_integer_add(self, _: C, _: N) -> Self::Output;
}
Expand description

Used for addition of signed integers; C = P.cmp(N) Assumes P = Self is positive and N is negative where P and N are both passed as unsigned integers

Required Associated Types§

Required Methods§

Source

fn private_integer_add(self, _: C, _: N) -> Self::Output

Implementors§

Source§

impl<N, P: Unsigned> PrivateIntegerAdd<Less, N> for P
where N: Sub<P> + Unsigned, <N as Sub<P>>::Output: Unsigned + NonZero,

P + N = Negative where P < N

Source§

type Output = NInt<<N as Sub<P>>::Output>

Source§

impl<N: Unsigned, P> PrivateIntegerAdd<Greater, N> for P
where P: Sub<N> + Unsigned, <P as Sub<N>>::Output: Unsigned + NonZero,

P + N = Positive where P > N

Source§

type Output = PInt<<P as Sub<N>>::Output>

Source§

impl<N: Unsigned, P: Unsigned> PrivateIntegerAdd<Equal, N> for P

P + N = 0 where P == N