pub enum GType {
Comm {
sender: Role,
receiver: Role,
msg_ty: BaseType,
cont: Box<GType>,
},
Choice {
selector: Role,
receiver: Role,
branches: HashMap<String, GType>,
},
End,
Rec(String, Box<GType>),
Var(String),
}Expand description
A global session type (multiparty protocol specification).
Variants§
Comm
p → q : T; G — p sends T to q, continues as G.
Fields
Choice
p → q { branch₁ : G₁, branch₂ : G₂ } — p selects a branch to q.
Fields
End
Protocol end.
Rec(String, Box<GType>)
Recursive global type: μX.G.
Var(String)
Recursion variable.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GType
impl RefUnwindSafe for GType
impl Send for GType
impl Sync for GType
impl Unpin for GType
impl UnsafeUnpin for GType
impl UnwindSafe for GType
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
Mutably borrows from an owned value. Read more