Function bicoro::cooperate

source ·
pub fn cooperate<'a, I, O, IA, OA, IB, OB, MA, MB, A, B, S>(
    selector: S,
    map_first: MA,
    map_second: MB,
    first: Coroutine<'a, IA, OA, A>,
    second: Coroutine<'a, IB, OB, B>
) -> Coroutine<'a, I, O, CooperateResult<'a, IA, IB, OA, OB, A, B>>where
    S: Fn(I) -> UnicastSelect<IA, IB> + Send + 'a,
    MA: Fn(OA) -> UnicastSelect<IB, O> + Send + 'a,
    MB: Fn(OB) -> UnicastSelect<IA, O> + Send + 'a,
    OA: Send,
    OB: Send,
    B: Send,
    A: Send,
    O: Send,