Struct party_types::Choice [−][src]
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]
self,
c1: &mut Channel<Role1, Tr>,
c2: &mut Channel<Role2, Tr>
) -> Result<ChoiceResult<T1, Cont1, T2, Cont2>>
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,
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,
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,
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,
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,
Cont1: UnwindSafe,
Cont2: UnwindSafe,
Role1: UnwindSafe,
Role2: UnwindSafe,
T1: UnwindSafe,
T2: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,