Function bicoro::receive_or_skip

source ·
pub fn receive_or_skip<'a, I, O, R, F, IA, IB>(
    co: Coroutine<'a, IA, O, R>,
    sel: F
) -> Coroutine<'a, I, UnicastSelect<IB, O>, R>where
    F: Fn(I) -> UnicastSelect<IA, IB> + Send + 'a,
    O: Send,
    R: Send,
Expand description

Use to either consume this input or re-emit as an output

This is useful when we want to intercept or transform messages, but I may not be convertible to IA In this case we emit the transform IB back out, hoping that another routine may deal with it