Macro mpstthree::choose_mpst_b_to_all

source ·
macro_rules! choose_mpst_b_to_all {
    ($session: expr,  $( $label: path),+ $(,)? ) => { ... };
}
Expand description

Choose, for B, among two different sessions

§Arguments

  • The session to be used
  • The first path to be used
  • The second path to be used

§Example

match xs.pop() {
    Option::Some(_) => {
        let s = choose_mpst_b_to_all!(
            s,
            CBranchesAtoB::Video,
            CBranchesCtoB::Video
        );
        let s = send_mpst_b_to_a(1, s);
        let (_, s) = recv_mpst_b_from_a(s)?;
        client_recurs(s, xs, index + 1)
    }
    Option::None => {
        let s = choose_mpst_b_to_all!(
            s,
            CBranchesAtoB::End,
            CBranchesCtoB::End
        );
        close_mpst(s)
    }
}