macro_rules! bundle_impl_interleaved_with_enum_and_cancel {
(
$meshedchannels_name: ident,
$( $all_roles: ident),+ $(,)?
) => { ... };
}
Available on crate feature
baking
only.Expand description
Create a new SessionMST structuren, new roles and the baking environment,
with send
functions that can fail.
Also create the macros needed for choosing branches.
Each macro is linked to a role X and are called as followed:
choose_mpst_x_to_all!(
s, # the current session
enum_1::variant_1, # the first branch for the first passive role
enum_2::variant_2, # the first branch for the second passive role
…
enum_n::variant_n, # the first branch for the n-th passive role
).
This macro does NOT create the related fork_mpst
function
to avoid conflicts for interleaved functions.
Arguments
- Name of the new SessionMST
- Names of the new roles. They are called as RoleX where X is the name provided.
Basic example
use mpstthree::bundle_impl_with_enum;
bundle_impl_with_enum!(MeshedChannelsThree, A, B, C);