wacky_traits 2.0.0

Defines some traits
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13

pub trait Mapper<Input> {
    type Output;
    fn map(&self,value:Input)->Self::Output;
}

impl<Input,Output,TFn:Fn(Input)->Output> Mapper<Input> for TFn {
    type Output = Output;
    //type TOutput = TOut;
    fn map(&self,value:Input)->Self::Output {
        self(value)
    }
}