Macro mpstthree::recv_mpst [−][src]
macro_rules! recv_mpst { ($session : expr, $sender : ident, $receiver : ident, $meshedchannels_name : ident, $nsessions : literal, $exclusion : literal) => { ... }; }
Expand description
RECV Shorter way to call the code within the recv function instead of having to create the function itself.
Arguments
- The session that will be used
- The name of the sender
- The name of the receiver
- The name of the MeshedChannels type that will be used
- The number of participants (all together)
- The index of the binary session type that will receive in the MeshedChannels for this specific role. Index starts at 1.
Example
ⓘ
use mpstthree::{create_multiple_normal_role, create_meshedchannels, recv_mpst}; create_meshedchannels!(MeshedChannelsThree, 3); create_multiple_normal_role!( RoleA, RoleADual | RoleB, RoleBDual | RoleD, RoleDDual | ); fn main(s: Endpoint) -> Result<(), Box<dyn std::error::Error>> { let (_payload, _s) = recv_mpst!(s, RoleB, RoleA, MeshedChannelsThree, 3, 1)()?; }