Macro mpstthree::create_send_check_cancel_bundle [−][src]
macro_rules! create_send_check_cancel_bundle { ($($func_name : ident, $receiver : ident, $exclusion : literal |) + => $sender : ident, $meshedchannels_name : ident, $nsessions : literal) => { ... }; }
Expand description
Creates multiple send functions to send from a given binary session type of a MeshedChannels with more than 3 participants.
Arguments
- The name of the new send functions
- The name of the receivers
- The name of the senders
- The index of the binary session types that will receive in the MeshedChannels for this specific role. Index starts at 2 as 1 is an End.
- The name of the MeshedChannels type that will be used
- The number of participants (all together)
Example
use mpstthree::role::Role; use mpstthree::{create_normal_role, create_meshedchannels, create_send_check_cancel_bundle}; create_normal_role!(RoleA, RoleADual); create_normal_role!(RoleB, RoleBDual); create_normal_role!(RoleD, RoleDDual); create_meshedchannels!(MeshedChannels, 3); create_send_check_cancel_bundle!( send_cancel_d_to_b, RoleB, 2 | => RoleD, MeshedChannels, 3 );
Compile fail
ⓘ
use mpstthree::role::Role; use mpstthree::{create_multiple_normal_role, create_meshedchannels, create_send_check_cancel_bundle}; create_multiple_normal_role!( RoleA, RoleADual | RoleB, RoleBDual | RoleD, RoleDDual | ); create_meshedchannels!(MeshedChannels, 3); create_send_check_cancel_bundle!( send_cancel_d_to_a, RoleA, 1 | send_cancel_d_to_b, RoleB, 2 | => RoleD, MeshedChannels, 3 );