macro_rules! choose_mpst_create_multi_to_all {
(
$name: expr,
$( $receiver: ident , )+ =>
$sender: ident,
$meshedchannels_name: ident,
$exclusion: literal
) => { ... };
}
Available on crate feature
macros_multiple
only.Expand description
Create a macro that simplifies the usage of choose_mpst_multi_to_all
.
Arguments
- The name of the new macro
- The different passive roles
- The name of the sender
- The name of the MeshedChannels type that will be used
- The index of the active role
Example
Available on the cases_short/macro_multi_recursion_macro_of_macro test.
ⓘ
choose_mpst_create_multi_to_all!(
choose_mpst_client_to_all,
RoleA, RoleB, =>
RoleD, MeshedChannels,
3
);
match xs.pop() {
Option::Some(_) => {
let s: EndpointDVideo<i32> = choose_mpst_client_to_all!(
s,
Branches0AtoD::Video,
Branches0BtoD::Video,
);
let (_, s) = s.send(1).recv()?;
client_recurs(s, xs, index + 1)
}
Option::None => {
let s = choose_mpst_client_to_all!(
s,
Branches0AtoD::End,
Branches0BtoD::End,
);
assert_eq!(index, 100);
s.close()
}
}
This macro is available only if MultiCrusty is built with
the "macros_multiple"
feature.