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