Function mpstthree::binary::offer::offer_either

source ·
pub fn offer_either<'a, S1, S2, F, G, R>(
    s: Offer<S1, S2>,
    f: F,
    g: G
) -> Result<R, Box<dyn Error + 'a>>
where S1: Session, S2: Session, F: FnOnce(S1) -> Result<R, Box<dyn Error + 'a>>, G: FnOnce(S2) -> Result<R, Box<dyn Error + 'a>>,
Expand description

Offer a choice between two sessions S1 and S2.