[][src]Struct dialectic::types::Choose

#[repr(transparent)]pub struct Choose<Choices>(pub Choices);

Actively choose between any of the protocols in the tuple Choices.

At most 128 choices can be presented to a Choose type; to choose from more options, nest Chooses within each other.

Trait Implementations

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>

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

type Env = E

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

impl<Choices: Clone> Clone for Choose<Choices>[src]

impl<Choices: Copy> Copy for Choose<Choices>[src]

impl<Choices: Debug> Debug for Choose<Choices>[src]

impl<Choices: Default> Default for Choose<Choices>[src]

impl<Choices: Eq> Eq for Choose<Choices>[src]

impl<Choices: Hash> Hash for Choose<Choices>[src]

impl<Choices: Ord> Ord for Choose<Choices>[src]

impl<Choices: PartialEq> PartialEq<Choose<Choices>> for Choose<Choices>[src]

impl<Choices: PartialOrd> PartialOrd<Choose<Choices>> for Choose<Choices>[src]

impl<N: Unary, Choices: Tuple + Any> Scoped<N> for Choose<Choices> where
    Choices::AsList: EachScoped<N>,
    <Choices::AsList as EachSession>::Dual: List
[src]

impl<Choices: Any> Session for Choose<Choices> where
    Choices: Tuple,
    Choices::AsList: EachSession,
    <Choices::AsList as EachSession>::Dual: List + EachSession
[src]

type Dual = Offer<<<Choices::AsList as EachSession>::Dual as List>::AsTuple>

The dual to this session type, i.e. the session type required of the other end of the channel. Read more

impl<Choices> StructuralEq for Choose<Choices>[src]

impl<Choices> StructuralPartialEq for Choose<Choices>[src]

Auto Trait Implementations

impl<Choices> RefUnwindSafe for Choose<Choices> where
    Choices: RefUnwindSafe
[src]

impl<Choices> Send for Choose<Choices> where
    Choices: Send
[src]

impl<Choices> Sync for Choose<Choices> where
    Choices: Sync
[src]

impl<Choices> Unpin for Choose<Choices> where
    Choices: Unpin
[src]

impl<Choices> UnwindSafe for Choose<Choices> where
    Choices: UnwindSafe
[src]

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<'a, T> CallBy<'a, Mut> for T where
    T: 'a, 
[src]

type Type = &'a mut T

The type of Self when called by Convention.

impl<'a, T> CallBy<'a, Ref> for T where
    T: 'a, 
[src]

type Type = &'a T

The type of Self when called by Convention.

impl<'a, T> CallBy<'a, Val> for T[src]

type Type = T

The type of Self when called by Convention.

impl<Q, K> Equivalent<K> for Q where
    Q: Eq + ?Sized,
    K: Borrow<Q> + ?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, 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.