pub struct SessionStep {
pub op: String,
pub message_type: String,
pub branches: Vec<SessionBranch>,
pub binder: String,
pub resumable: bool,
pub loc: Loc,
}Expand description
One step in a session protocol.
v1.1.0: send T | receive T | loop | end. v2.3.0 adds choice:
select { ℓ: [..], … } (⊕ — this role chooses) and branch { ℓ: [..], … }
(& — this role offers); for those ops the labelled continuations live in
SessionStep::branches (a nested sub-protocol per label).
Fields§
§op: String§message_type: String§branches: Vec<SessionBranch>v2.3.0 — populated only for op == "select" | "branch": the labelled
branches, each a nested step sequence (its own sub-protocol).
v2.36.0 — reused for op == "interrupt": exactly two labelled arms,
body (the interruptible region) and handler (runs on the signal). The
handler may end in a resume step (back to body) or reach end (the
abandon exit) — see the paper section 3.5 two-exit construct.
binder: Stringv2.36.0 — op == "interrupt" only: the handler’s signal binder from
... as <sig> .... Empty for every other op. The handler references the
received CallInterruptCause value under this name.
resumable: boolv2.36.0 — op == "interrupt" only: true when the block declares a
resumable { … } handler (the v1 surface always does). Default false
keeps every non-interrupt step byte-identical in the IR (skip-if-false).
loc: LocTrait Implementations§
Source§impl Clone for SessionStep
impl Clone for SessionStep
Source§fn clone(&self) -> SessionStep
fn clone(&self) -> SessionStep
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more