The types in this module enumerate the shapes of all expressible sessions.
pub use unary::types::*; |
pub use unary::LessThan; |
pub use unary::Unary; |
pub use unary::S; |
pub use unary::Z; |
tuple | Conversions back and forth between flat tuples like (P, Q, R) and their corresponding
inductive structures like (P, (Q, (R, ()))) .
|
unary | The unary numbers, represented by zero Z and successor S .
|
Break | Break out of a Loop . The type-level index points to the loop to be broken, counted from the
innermost starting at Z .
|
Choose | Actively choose between any of the protocols in the tuple
Choices .
|
Continue | Repeat a Loop . The type-level index points to the loop to be repeated, counted from the
innermost starting at Z .
|
Done | A finished session. The only thing to do with a Chan when it is Done is to drop it or,
preferably, close it.
|
Loop | Label a loop point, which can be reiterated with Continue , or broken out of with Break .
|
Offer | Passively offer! a choice between any of the protocols in the tuple Choices .
|
Recv | Receive a message of type T using recv , then continue with
protocol P .
|
Send | Send a message of type T using send , then continue with
protocol P .
|
Seq | Sequence two sessions P and Q together using seq .
|
Split | Split the connection into send-only and receive-only halves using
split .
|
Actionable | The Actionable trait infers the next action necessary on a channel, automatically stepping
through Loop s and Continue sion points.
|
EachActionable | In the Choose and Offer session types, we provide the ability to choose/offer a list of
protocols. The sealed EachSession trait ensures that every protocol in a type level list of
protocols is Actionable .
|
EachScoped | In the Choose and Offer session types, EachScoped<N> is used to assert that every
choice or offering is Scoped .
|
EachSession | In the Choose and Offer session types, we provide the ability to choose/offer a list of
protocols. The sealed EachSession trait ensures that every protocol in a type level list of
protocols Session .
|
Environment | A valid session environment is a type-level list of session types, each of which may refer by
Continue index to any other session in the list which is below or including itself.
|
Scoped | A session type is scoped for a given environment depth N if it Continue s no more than
N Loop levels above itself.
|
Select | Select by index from a type level list.
|
Session | A session type describes the sequence of operations performed by one end of a bidirectional
Chan .
|