macro_rules! create_choose_mpst_session_multi_both { ( $func_name_left:ident, $func_name_right:ident, $type_name:ident, $role_dual:ident, $name:ident, $meshedchannels_name:ident, $n_sessions:literal ) => { ... }; }
Available on crate feature
macros_multiple
only.Expand description
Create the two ChooseMpst functions to send a Choose on each branch to be used with more than 3 participants. Only works when active role is the last one.
§Arguments
- The name of the new ChooseMpst function for the left branch
- The name of the new ChooseMpst function for the right branch
- The name of the ChooseMpst type that is used
- The name of the dual of the broadcasting sender. This one should contain toAll according to the convention
- The name of the sender
- The name of the MeshedChannels type that will be used
- The number of participants (all together)
§Example
use mpstthree::{
create_broadcast_role, create_choose_mpst_session_multi_both, create_choose_type_multi,
create_meshedchannels, create_normal_name, create_normal_role,
};
create_normal_role!(RoleD, RoleDDual);
create_broadcast_role!(RoleAlltoD, RoleDtoAll);
create_normal_name!(NameD);
create_meshedchannels!(MeshedChannels, 3);
create_choose_type_multi!(ChooseMpstThree, MeshedChannels, 3);
create_choose_mpst_session_multi_both!(
choose_left_mpst_session_d_to_all,
choose_right_mpst_session_d_to_all,
ChooseMpstThree,
RoleDtoAll,
NameD,
MeshedChannels,
3
);
This macro is available only if MultiCrusty is built with
the "macros_multiple"
feature.