[][src]Struct trait_eval::Succ

pub struct Succ<T> where
    T: Nat
{ /* fields omitted */ }

Peano-style increment operator

assert_eq!(Succ::<Six>::eval(), 7);

Trait Implementations

impl<T: Nat> Equals<Succ<T>> for Zero[src]

type Result = False

impl<T: Nat, U: Nat> Equals<Succ<T>> for Succ<U> where
    T: Equals<U>, 
[src]

type Result = T::Result

impl<T: Nat> Equals<Zero> for Succ<T>[src]

type Result = False

impl<T: Nat> Eval for Succ<T> where
    T: Eval<Output = usize>, 
[src]

type Output = usize

The Rust representation of our type.

impl<T: Nat, U: Nat> Fact for Succ<T> where
    T: Fact<Result = U>,
    U: Times<Succ<T>>, 
[src]

type Result = U::Result

impl<T: Nat, U: Bool, V: Nat, W: Nat> Fib for Succ<T> where
    T: Equals<Zero, Result = U>,
    Succ<T>: FibRecurse<Result = V>,
    (One, V): If<U, Result = W>, 
[src]

type Result = W

impl<T: Nat> LessThan<Succ<T>> for Zero[src]

type Result = True

impl<T: Nat, U: Nat> LessThan<Succ<T>> for Succ<U> where
    U: LessThan<T>, 
[src]

type Result = U::Result

impl<T: Nat> LessThan<Zero> for Succ<T>[src]

type Result = False

impl<T: Nat, U: Nat, V: Nat> Minus<Succ<T>> for U where
    U: Minus<T, Result = V>,
    V: Pred
[src]

type Result = V::Result

impl<T: Nat, U: Nat, V: Nat, W: Nat, C: Bool> Mod<T> for Succ<U> where
    Self: Minus<T, Result = V> + LessThan<T, Result = C>,
    V: Mod<T>,
    (Self, <V as Mod<T>>::Result): If<C, Result = W>, 
[src]

type Result = W

impl<T: Nat> Nat for Succ<T>[src]

impl<T: Nat, U: Nat> Plus<T> for Succ<U> where
    U: Plus<T>, 
[src]

type Result = Succ<U::Result>

impl<T: Nat> Pred for Succ<T>[src]

type Result = T

impl<T: Nat, U: Nat, V: Nat> Times<T> for Succ<U> where
    U: Times<T, Result = V>,
    V: Plus<T>, 
[src]

type Result = V::Result

Auto Trait Implementations

impl<T> RefUnwindSafe for Succ<T> where
    T: RefUnwindSafe

impl<T> Send for Succ<T> where
    T: Send

impl<T> Sync for Succ<T> where
    T: Sync

impl<T> Unpin for Succ<T> where
    T: Unpin

impl<T> UnwindSafe for Succ<T> where
    T: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U, V> Minus<Succ<T>> for U where
    T: Nat,
    U: Nat + Minus<T, Result = V>,
    V: Nat + Pred
[src]

type Result = <V as Pred>::Result

impl<T, U, V> Minus<Succ<T>> for U where
    T: Nat,
    U: Nat + Minus<T, Result = V>,
    V: Nat + Pred
[src]

type Result = <V as Pred>::Result

impl<T> Minus<Zero> for T where
    T: Nat
[src]

type Result = T

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.