Struct party_types::Choice[][src]

pub struct Choice<Role1, T1, Cont1, Role2, T2, Cont2> { /* fields omitted */ }

This node allows receiving from either R1 or R2, depending on an external choice.

The choice is modeled as a tuple on the sender side. The Other is either another Choice or End.

Implementations

impl<Role1, T1: 'static, Cont1, Role2, T2: 'static, Cont2> Choice<Role1, T1, Cont1, Role2, T2, Cont2>[src]

pub fn recv<Tr: Transport>(
    self,
    c1: &mut Channel<Role1, Tr>,
    c2: &mut Channel<Role2, Tr>
) -> Result<ChoiceResult<T1, Cont1, T2, Cont2>>
[src]

Trait Implementations

impl<Role1, T1, Cont1: Default, Role2, T2, Cont2: Default> Default for Choice<Role1, T1, Cont1, Role2, T2, Cont2>[src]

Auto Trait Implementations

impl<Role1, T1, Cont1, Role2, T2, Cont2> RefUnwindSafe for Choice<Role1, T1, Cont1, Role2, T2, Cont2> where
    Cont1: RefUnwindSafe,
    Cont2: RefUnwindSafe,
    Role1: RefUnwindSafe,
    Role2: RefUnwindSafe,
    T1: RefUnwindSafe,
    T2: RefUnwindSafe

impl<Role1, T1, Cont1, Role2, T2, Cont2> Send for Choice<Role1, T1, Cont1, Role2, T2, Cont2> where
    Cont1: Send,
    Cont2: Send,
    Role1: Send,
    Role2: Send,
    T1: Send,
    T2: Send

impl<Role1, T1, Cont1, Role2, T2, Cont2> Sync for Choice<Role1, T1, Cont1, Role2, T2, Cont2> where
    Cont1: Sync,
    Cont2: Sync,
    Role1: Sync,
    Role2: Sync,
    T1: Sync,
    T2: Sync

impl<Role1, T1, Cont1, Role2, T2, Cont2> Unpin for Choice<Role1, T1, Cont1, Role2, T2, Cont2> where
    Cont1: Unpin,
    Cont2: Unpin,
    Role1: Unpin,
    Role2: Unpin,
    T1: Unpin,
    T2: Unpin

impl<Role1, T1, Cont1, Role2, T2, Cont2> UnwindSafe for Choice<Role1, T1, Cont1, Role2, T2, Cont2> where
    Cont1: UnwindSafe,
    Cont2: UnwindSafe,
    Role1: UnwindSafe,
    Role2: UnwindSafe,
    T1: UnwindSafe,
    T2: UnwindSafe

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, 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.