pub fn recv_mpst_b_to_a<T, S1, S2, R>(
    s: SessionMpst<Recv<T, S1>, S2, RoleA<R>, RoleB<RoleEnd>>,
) -> ResultBoxError<T, S1, S2, R, RoleB<RoleEnd>>
where
    T: marker::Send,
    S1: Session,
    S2: Session,
    R: Role,
{
    let (v, new_session) = recv(s.session1)?;
    let new_queue = next_a(s.stack);
    let result = SessionMpst {
        session1: new_session,
        session2: s.session2,
        stack: new_queue,
        name: s.name,
    };

    Ok((v, result))
}
/// Receive a value of type `T` on B from A. Can fail. Returns either a pair of the received
/// value and the continuation of the `SessionMpst<S1, S2, R>` or an error.
Receive a value of type `T` on B from A. Can fail. Returns either a pair of the received
value and the continuation of the `SessionMpst` or an error.
Receive a value of type ` T ` on B from A . Can fail . Returns either a pair of the received value and the continuation of the ` SessionMpst ` or an error .
pub fn recv_mpst_b_to_a<T, S1, S2, R>(
    s: SessionMpst<Recv<T, S1>, S2, RoleA<R>, RoleB<RoleEnd>>,
) -> ResultBoxError<T, S1, S2, R, RoleB<RoleEnd>>
where
    T: marker::Send,
    S1: Session,
    S2: Session,
    R: Role,
{
    let (v, new_session) = recv(s.session1)?;
    let new_queue = next_a(s.stack);
    let result = SessionMpst {
        session1: new_session,
        session2: s.session2,
        stack: new_queue,
        name: s.name,
    };
    Ok((v, result))
}
pub fn recv_mpst_b_to_a < T , S1 , S2 , R > ( s : SessionMpst < Recv < T , S1 > , S2 , RoleA < R > , RoleB < RoleEnd > > , ) -> ResultBoxError < T , S1 , S2 , R , RoleB < RoleEnd > > where T : marker :: Send , S1 : Session , S2 : Session , R : Role , { let ( v , new_session ) = recv ( s . session1 ) ? ; let new_queue = next_a ( s . stack ) ; let result = SessionMpst { session1 : new_session , session2 : s . session2 , stack : new_queue , name : s . name , } ; Ok ( ( v , result ) ) }
Receive a value of type `T` on B from A.
Receive a value of type ` T ` on B from A .
s
SessionMpst<Recv<T, S1>, S2, RoleA<R>, RoleB<RoleEnd>>
s
SessionMpst<Recv<T, S1>, S2, RoleA<R>, RoleB<RoleEnd>>