generator-light 0.3.0

Light stackless generators based on Futures
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
pub trait FnOnceOutput<In> {
    type Out;
    fn call(self, x: In) -> Self::Out;
}

impl<In, F, O> FnOnceOutput<In> for F
where
    F: FnOnce(In) -> O,
{
    type Out = O;
    fn call(self, x: In) -> Self::Out {
        self(x)
    }
}