Struct typenum::int::NInt [] [src]

pub struct NInt<U: Unsigned + NonZero> {
    // some fields omitted
}

Negative integers

Trait Implementations

impl<U: Unsigned + NonZero> NonZero for NInt<U>
[src]

impl<U: Unsigned + NonZero> Integer for NInt<U>
[src]

fn to_i8() -> i8

fn to_i16() -> i16

fn to_i32() -> i32

fn to_i64() -> i64

fn to_isize() -> isize

impl<U: Unsigned + NonZero> Same<NInt<U>> for NInt<U>
[src]

type Output = NInt<U>

Output should always be Self

impl<U: Unsigned + NonZero> Neg for NInt<U>
[src]

-NInt = PInt

type Output = PInt<U>

The resulting type after applying the - operator

fn neg(self) -> Self::Output

The method for the unary - operator

impl<U: Unsigned + NonZero> Add<Z0> for NInt<U>
[src]

NInt + Z0 = NInt

type Output = NInt<U>

The resulting type after applying the + operator

fn add(self, _: Z0) -> Self::Output

The method for the + operator

impl<Ul: Unsigned + NonZero, Ur: Unsigned + NonZero> Add<NInt<Ur>> for NInt<Ul> where Ul: Add<Ur>, Ul::Output: Unsigned + NonZero
[src]

N(Ul) + N(Ur) = N(Ul + Ur)

type Output = NInt<Ul::Output>

The resulting type after applying the + operator

fn add(self, _: NInt<Ur>) -> Self::Output

The method for the + operator

impl<Ul: Unsigned + NonZero, Ur: Unsigned + NonZero> Add<PInt<Ur>> for NInt<Ul> where Ur: Cmp<Ul> + PrivateIntegerAdd<Ur::Output, Ul>
[src]

P(Ul) + P(Ur): We resolve this with our PrivateAdd

type Output = Ur::Output

The resulting type after applying the + operator

fn add(self, _: PInt<Ur>) -> Self::Output

The method for the + operator

impl<U: Unsigned + NonZero> Sub<Z0> for NInt<U>
[src]

NInt - Z0 = NInt

type Output = NInt<U>

The resulting type after applying the - operator

fn sub(self, _: Z0) -> Self::Output

The method for the - operator

impl<Ul: Unsigned + NonZero, Ur: Unsigned + NonZero> Sub<PInt<Ur>> for NInt<Ul> where Ul: Add<Ur>, Ul::Output: Unsigned + NonZero
[src]

N(Ul) - P(Ur) = N(Ul + Ur)

type Output = NInt<Ul::Output>

The resulting type after applying the - operator

fn sub(self, _: PInt<Ur>) -> Self::Output

The method for the - operator

impl<Ul: Unsigned + NonZero, Ur: Unsigned + NonZero> Sub<NInt<Ur>> for NInt<Ul> where Ur: Cmp<Ul> + PrivateIntegerAdd<Ur::Output, Ul>
[src]

N(Ul) - N(Ur): We resolve this with our PrivateAdd

type Output = Ur::Output

The resulting type after applying the - operator

fn sub(self, _: NInt<Ur>) -> Self::Output

The method for the - operator

impl<U: Unsigned + NonZero> Mul<Z0> for NInt<U>
[src]

N * Z0 = Z0

type Output = Z0

The resulting type after applying the * operator

fn mul(self, _: Z0) -> Self::Output

The method for the * operator

impl<Ul: Unsigned + NonZero, Ur: Unsigned + NonZero> Mul<NInt<Ur>> for NInt<Ul> where Ul: Mul<Ur>, Ul::Output: Unsigned + NonZero
[src]

N(Ul) * N(Ur) = P(Ul * Ur)

type Output = PInt<Ul::Output>

The resulting type after applying the * operator

fn mul(self, _: NInt<Ur>) -> Self::Output

The method for the * operator

impl<Ul: Unsigned + NonZero, Ur: Unsigned + NonZero> Mul<PInt<Ur>> for NInt<Ul> where Ul: Mul<Ur>, Ul::Output: Unsigned + NonZero
[src]

N(Ul) * P(Ur) = N(Ul * Ur)

type Output = NInt<Ul::Output>

The resulting type after applying the * operator

fn mul(self, _: PInt<Ur>) -> Self::Output

The method for the * operator

impl<Ul: Unsigned + NonZero, Ur: Unsigned + NonZero> Div<NInt<Ur>> for NInt<Ul> where Ul: Div<Ur>, Ul::Output: Unsigned + NonZero
[src]

N(Ul) / N(Ur) = P(Ul / Ur)

type Output = PInt<Ul::Output>

The resulting type after applying the / operator

fn div(self, _: NInt<Ur>) -> Self::Output

The method for the / operator

impl<Ul: Unsigned + NonZero, Ur: Unsigned + NonZero> Div<PInt<Ur>> for NInt<Ul> where Ul: Div<Ur>, Ul::Output: Unsigned + NonZero
[src]

N(Ul) / P(Ur) = N(Ul / Ur)

type Output = NInt<Ul::Output>

The resulting type after applying the / operator

fn div(self, _: PInt<Ur>) -> Self::Output

The method for the / operator