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,
    Result: Send + Sync,
    OutputA: Send + Sync,
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