Function bicoro::transform_output
source · [−]pub fn transform_output<'a, Input, OutputA, OutputB, Transform, Result>(
co: Coroutine<'a, Input, OutputA, Result>,
transform: Transform
) -> Coroutine<'a, Input, OutputB, Result>where
Transform: Fn(OutputA) -> Coroutine<'a, Input, OutputB, OutputB> + 'a,
Expand description
Transforms the output of coroutine A into B
This requires a coroutine that can map B outputs into a, as this is similar to running ‘co’ in the context of the output
This is a specialization of run_child
TLDR; change output with the output transform function