Function mpstthree::functionmpst::offer::offer_mpst_session_to_a_from_c
source · pub fn offer_mpst_session_to_a_from_c<'a, S1, S2, S3, S4, S5, F, G, R1, R2, U>(
s: MeshedChannels<S5, OfferMpst<S1, S2, S3, S4, R1, R2, NameA>, RoleAlltoC<RoleEnd, RoleEnd>, NameA>,
f: F,
g: G
) -> Result<U, Box<dyn Error + 'a>>
Expand description
Offer a choice to B from C (on its session field related to A) between two
MeshedChannels
,
MeshedChannels<S1, S2, R1, N1>
and MeshedChannels<S3, S4, R2, N2>
.
§Example
// Please check the tests usecase
ⓘ
offer_mpst_session_to_a_from_c(
s,
|s: EndpointARecv<i32>| {
let (request, s) = recv_mpst_a_from_c(s)?;
close_mpst(s)
},
|s: EndpointAEnd| {
close_mpst(s)
},
)