Function bicoro::intercept_input
source · pub fn intercept_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> + Send + Clone + 'a,
Result: Send,
Output: Send,
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 subroutine
TLDR; change Input with the inform transform function