pub fn project(
prog: &ProtocolProgram,
role: &str,
) -> Result<RoleEndpoint, Vec<IdlError>>Expand description
Project a global protocol onto role’s endpoint (§33.5).
Rules (phase 3, two-role semantics):
- a handler executes in the role that RECEIVES its trigger
(
from R⇒ every role ≠ R; omitted ⇒ counterpart default) send X to R2emits only in the executor’s endpoint;todefaults to the counterpart of the executor- state actions (
begin,fulfil,retract) execute in the executor