Macro mpstthree::choose_mpst_create_multi_to_all [−][src]
macro_rules! choose_mpst_create_multi_to_all { ($name : expr, $($receiver : ident,) + => $sender : ident, $meshedchannels_name : ident, $exclusion : literal) => { ... }; }
Expand description
Create a macro that simplifies the usage of
mpstthree::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() } }