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.
§Fase 4: send T | receive T | loop | end. §Fase 41.b 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>§Fase 41.b — populated only for op == "select" | "branch": the labelled
branches, each a nested step sequence (its own sub-protocol).
§Fase 79.b — 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 §3.5 two-exit construct.
binder: String§Fase 79.b — 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: bool§Fase 79.b — 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 moreSource§impl Debug for SessionStep
impl Debug for SessionStep
Source§impl Default for SessionStep
impl Default for SessionStep
Source§fn default() -> SessionStep
fn default() -> SessionStep
Auto Trait Implementations§
impl Freeze for SessionStep
impl RefUnwindSafe for SessionStep
impl Send for SessionStep
impl Sync for SessionStep
impl Unpin for SessionStep
impl UnsafeUnpin for SessionStep
impl UnwindSafe for SessionStep
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more