[][src]Trait dialectic::types::Actionable

pub trait Actionable<E = ()>: Session where
    E: Environment,
    Self: Scoped<E::Depth>, 
{ type Action: Actionable<Self::Env, Action = Self::Action, Env = Self::Env>; type Env: Environment; }

The Actionable trait infers the next action necessary on a channel, automatically stepping through Loops and Continuesion points.

Associated Types

type Action: Actionable<Self::Env, Action = Self::Action, Env = Self::Env>[src]

The next actual channel action: Send, Recv, Offer, Choose, or Split. This steps through Loop, Break, and Continue transparently.

The constraints on this associated type ensure that it is idemopotent: the Action and Env of an Action are the same as those of that Action.

type Env: Environment[src]

The environment resulting from stepping through one or many Loop, Break, or Continue points to the next real channel action.

Loading content...

Implementors

impl<E, Choices: Any> Actionable<E> for Choose<Choices> where
    Choices: Tuple,
    Choices::AsList: EachSession,
    <Choices::AsList as EachSession>::Dual: List + EachSession,
    Choices::AsList: EachScoped<E::Depth>,
    E: Environment
[src]

type Action = Choose<Choices>

type Env = E

impl<E, Choices: Any> Actionable<E> for Offer<Choices> where
    Choices: Tuple,
    Choices::AsList: EachSession,
    <Choices::AsList as EachSession>::Dual: List + EachSession,
    Choices::AsList: EachScoped<E::Depth>,
    E: Environment
[src]

type Action = Offer<Choices>

type Env = E

impl<E, P, Q> Actionable<E> for Seq<P, Q> where
    P: Scoped<E::Depth>,
    Q: Scoped<E::Depth>,
    E: Environment
[src]

type Action = Seq<P, Q>

type Env = E

impl<E, P, Q> Actionable<E> for Split<P, Q> where
    P: Scoped<E::Depth>,
    Q: Scoped<E::Depth>,
    E: Environment
[src]

type Action = Split<P, Q>

type Env = E

impl<E, P, Rest, N: Unary> Actionable<E> for Continue<N> where
    E: Select<N, Selected = P, Remainder = Rest> + Environment,
    Continue<N>: Scoped<E::Depth>,
    P: Actionable<(P, Rest)>,
    P: Scoped<S<<Rest as Environment>::Depth>>,
    P::Dual: Scoped<S<Rest::Depth>>,
    (P, Rest): Environment,
    Rest: Environment
[src]

type Action = <P as Actionable<(P, Rest)>>::Action

type Env = <P as Actionable<(P, Rest)>>::Env

impl<E, T: Any, P> Actionable<E> for Recv<T, P> where
    P: Scoped<E::Depth>,
    E: Environment
[src]

type Action = Recv<T, P>

type Env = E

impl<E, T: Any, P> Actionable<E> for Send<T, P> where
    P: Scoped<E::Depth>,
    E: Environment
[src]

type Action = Send<T, P>

type Env = E

impl<E: Environment> Actionable<E> for Done[src]

type Action = Done

type Env = ()

impl<N: Unary, P, Rest> Actionable<(P, Rest)> for Break<S<N>> where
    P: Scoped<S<<Rest as Environment>::Depth>>,
    N: LessThan<Rest::Depth>,
    Break<N>: Actionable<Rest>,
    (P, Rest): Environment + 'static,
    Rest: Environment,
    S<N>: LessThan<<(P, Rest) as Environment>::Depth>, 
[src]

Inductive case: break one less level from one less loop.

type Action = <Break<N> as Actionable<Rest>>::Action

type Env = <Break<N> as Actionable<Rest>>::Env

impl<P> Actionable<(P, ())> for Break<Z> where
    P: Scoped<S<Z>>,
    (P, ()): Environment + 'static,
    Z: LessThan<<(P, ()) as Environment>::Depth>, 
[src]

When in the outermost loop, Break exits that loop and finishes the session.

type Action = Done

type Env = ()

impl<P, E> Actionable<E> for Loop<P> where
    E: Environment,
    P: Actionable<(P, E)>,
    P: Scoped<S<E::Depth>>, 
[src]

type Action = <P as Actionable<(P, E)>>::Action

type Env = <P as Actionable<(P, E)>>::Env

impl<P, Q, Rest> Actionable<(P, (Q, Rest))> for Break<Z> where
    Q: Actionable<(Q, Rest)>,
    P: Scoped<S<S<<Rest as Environment>::Depth>>>,
    Q: Scoped<S<<Rest as Environment>::Depth>>,
    Q::Env: Environment,
    (P, (Q, Rest)): Environment + 'static,
    (Q, Rest): Environment,
    Rest: Environment,
    Z: LessThan<<(P, (Q, Rest)) as Environment>::Depth>, 
[src]

Break from a non-outermost loop: continue whatever loop we broke into.

type Action = Q::Action

type Env = Q::Env

Loading content...