[][src]Trait fortraith::Eval

pub trait Eval {
    type Output;
    fn eval() -> Self::Output;
}

trait_eval to Rust conversion

Here's a magic trait for getting your data out of trait_eval and into Rust. Don't worry - it doesn't actually evaluate anything at all, I just couldn't think of a better name.

Associated Types

type Output

The Rust representation of our type.

Loading content...

Required methods

fn eval() -> Self::Output

A static function to actually grab the data.

assert_eq!(Three::eval(), 3);
assert_eq!(<Six as Times<Seven>>::Result::eval(), 42);
Loading content...

Implementations on Foreign Types

impl Eval for False[src]

type Output = bool

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

type Output = usize

impl Eval for True[src]

type Output = bool

impl Eval for Zero[src]

type Output = usize

Loading content...

Implementors

Loading content...