Enum dialectic_compiler::target::Target[][src]

pub enum Target {
    Done,
    Recv(TypeRc<Spanned<Target>>),
    Send(TypeRc<Spanned<Target>>),
    Choose(Vec<Spanned<Target>>),
    Offer(Vec<Spanned<Target>>),
    Loop(Rc<Spanned<Target>>),
    Continue(usize),
    Split {
        tx_only: Rc<Spanned<Target>>,
        rx_only: Rc<Spanned<Target>>,
        cont: Rc<Spanned<Target>>,
    },
    Call(Rc<Spanned<Target>>, Rc<Spanned<Target>>),
    Then(Rc<Spanned<Target>>, Rc<Spanned<Target>>),
    Type(Type),
}

The target language of the macro: the type level language of session types in Dialectic.

This is a one-to-one mapping to the literal syntax you would write without using the Session! macro. The only constructors which don’t correspond directly to constructs with Session implementations are Target::Then, which translates to a type-level function invocation to concatenate two session types, and Target::Type, which translates to an embedding of some arbitrary session type by name (i.e. defined elsewhere as a synonym).

Variants

Done

Session type: Done.

Recv(TypeRc<Spanned<Target>>)

Session type: Recv<T, P>.

Send(TypeRc<Spanned<Target>>)

Session type: Send<T, P>.

Choose(Vec<Spanned<Target>>)

Session type: Choose<(P, ...)>.

Offer(Vec<Spanned<Target>>)

Session type: Offer<(P, ...)>.

Loop(Rc<Spanned<Target>>)

Session type: Loop<...>.

Continue(usize)

Session type: Continue<N>.

Split

Session type: Split<P, Q, R>.

Fields of Split

tx_only: Rc<Spanned<Target>>

The transmit-only half.

rx_only: Rc<Spanned<Target>>

The receive-only half.

cont: Rc<Spanned<Target>>

The continuation.

Session type: Call<P, Q>.

Session type: <P as Then<Q>>::Combined.

Type(Type)

Some arbitrary session type referenced by name.

Trait Implementations

impl Clone for Target[src]

impl Debug for Target[src]

impl Display for Target[src]

Auto Trait Implementations

impl !RefUnwindSafe for Target

impl !Send for Target

impl !Sync for Target

impl Unpin for Target

impl !UnwindSafe for Target

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.