pub fn switch<S, R, E>(
    pair: impl Pair<S, R, E> + 'static,
    pred: impl Fn(&Result<R, E>) -> bool + Send + 'static
) -> (impl Pair<S, R, E>, impl Pair<S, R, E>)where
    S: Send + 'static,
    R: Send + 'static,
    E: Send + 'static,
Expand description

Given a Pair and a predicate, return two pairs, one for True and one for False