macro_rules! create_fn_choose_mpst_cancel_multi_to_all_bundle {
(
$( $fn_name: ident , )+ =>
$( $branch: expr , )+ =>
$( $new_type: ty , )+ =>
$( $label: path , )+ =>
$( $receiver: ident , )+ =>
$broadcaster: 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 broadcaster
- 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<
End,
Send<(), Recv<(), Choose0fromCtoB>>,
R2A<R2B<RoleB<RoleEnd>>>,
NameC,
>;
create_fn_choose_mpst_cancel_multi_to_all_bundle!(
done_cancel_from_c_to_all, more_cancel_from_c_to_all, =>
Done, More, =>
EndpointDoneC, EndpointMoreC, =>
Branching0fromCtoA, Branching0fromCtoB, =>
RoleB, =>
RoleA, RoleC, MeshedChannelsThree, 3
);
This macro is available only if MultiCrusty is built with
the "macros_multiple"
feature.