macro_rules! create_fn_choose_mpst_multi_to_all_bundle {
(
$( $fn_name: ident , )+ =>
$( $branch: expr , )+ =>
$( $new_type: ty , )+ =>
$( $label: path , )+ =>
$( $receiver: ident , )+ =>
$sender: ident,
$meshedchannels_name: ident,
$exclusion: literal
) => { ... };
}
Available on crate feature
macros_multiple
only.Expand description
Create choose fuunctions, to choose among different sessions that are provided.
Arguments
- The name of the new functions
- The name of the branches, need to be the same for every participants
- The new type adopted by the sender
- The name of the Enum containing the branches
- The different passive roles
- The name of the sender
- The name of the MeshedChannels type that will be used
- The index of the sender among all participants
Example
Available on the long_simple_three_mpst_short examples.
ⓘ
type EndpointDoneC = MeshedChannelsThree<End, End, RoleEnd, NameC>;
type EndpointMoreC = MeshedChannelsThree<
Send<(), Recv<(), Choose0fromCtoA>>,
Send<(), Recv<(), Choose0fromCtoB>>,
R2A<R2B<RoleA<RoleB<RoleEnd>>>>,
NameC,
>;
create_fn_choose_mpst_multi_to_all_bundle!(
done_from_c_to_all, more_from_c_to_all, =>
Done, More, =>
EndpointDoneC, EndpointMoreC, =>
Branching0fromCtoA, Branching0fromCtoB, =>
RoleA, RoleB, =>
RoleC, MeshedChannelsThree, 3
);
This macro is available only if MultiCrusty is built with
the "macros_multiple"
feature.