Struct dimensioned::peano::Succ [] [src]

pub struct Succ<N: NonNeg> {
    // some fields omitted
}

Trait Implementations

impl<N: NonNeg> Peano for Succ<N>

impl<N: NonNeg> NonNeg for Succ<N>

impl<N: NonNeg> NonZero for Succ<N>

impl<LHS: NonNeg + AddPeano<Succ<RHS>>, RHS: NonNeg> AddPeano<Succ<RHS>> for Succ<LHS>

Adding positive numbers (e.g. 1 + 2)

type Output = Succ<LHS::Output>

impl<LHS: NonNeg> AddPeano<Zero> for Succ<LHS>

Adding zero to positive numbers (e.g. 3 + 0)

type Output = Succ<LHS>

impl<LHS: NonNeg + AddPeano<RHS>, RHS: NonPos> AddPeano<Pred<RHS>> for Succ<LHS>

Adding negative numbers to positive numbers (e.g. 2 + -3)

type Output = LHS::Output

impl<N: NonNeg + Negate> Negate for Succ<N>

type Output = Pred<N::Output>

impl<LHS: NonNeg + SubPeano<RHS>, RHS> SubPeano<Succ<RHS>> for Succ<LHS>

Subtracting positive numbers from positive numbers (e.g. 3 - 4)

type Output = LHS::Output

impl<LHS: NonNeg> SubPeano<Zero> for Succ<LHS>

Subtracting zero from positive numbers (e.g. 3 - 0)

type Output = Succ<LHS>

impl<LHS: NonNeg + SubPeano<RHS>, RHS: NonPos> SubPeano<Pred<RHS>> for Succ<LHS>

Subtracting negative numbers from positive numbers (e.g. 3 - -4)

type Output = Succ<Succ<LHS::Output>>

impl<LHS, RHS> MulPeano<RHS> for Succ<LHS> where LHS: NonNeg + MulPeano<RHS>, RHS: AddPeano<LHS::Output>

Multiplying a positive integer by an arbitrary integer (e.g. 2 * N)

type Output = RHS::Output

impl<LHS, RHS> DivPeano<RHS> for Succ<LHS> where LHS: NonNeg, Succ<LHS>: DivPeanoPriv<RHS>

type Output = Succ<LHS>::Output

impl<N: NonNeg + ToInt> ToInt for Succ<N>

fn to_int() -> i32

Derived Implementations

impl<N: Clone + NonNeg> Clone for Succ<N> where N: Clone

fn clone(&self) -> Succ<N>

fn clone_from(&mut self, source: &Self)

impl<N: Copy + NonNeg> Copy for Succ<N> where N: Copy