typle 0.13.0

Generic tuple bounds and transformations
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#![allow(type_alias_bounds, unused)]

use typle::typle;

trait Process {
    type State;
    type Output;

    fn process(state: Self::State) -> Result<Self::Output, Box<dyn std::error::Error>>;
}

#[typle(Tuple for 0..=3)]
type Alias<T>
where
    T: Tuple,
    T<_>: Process,
= (typle!(i in ..T::MAX => Option<T<{i}>::Output>));