Struct nemo::Chan
[−]
[src]
pub struct Chan<'a, I: 'a, E: SessionType, S: SessionType>(_, _);
Channels are provided to handlers to act as a "courier" for the session type and a guard for the IO backend.
Methods
impl<'a, I, E: SessionType, S: SessionType> Chan<'a, I, E, S>
[src]
fn defer<P: Handler<I, E, S>>(self) -> Defer<P, I>
Defer the rest of the protocol execution. Useful for returning early.
There must be a Handler
implemented for the protocol state you're deferring.
impl<'a, I: IO<usize>, E: SessionType> Chan<'a, I, E, End>
[src]
fn close<P: Protocol>(self) -> Defer<P, I>
Close the channel. Only possible if it's in the End
state.
impl<'a, I: IO<A>, A, E: SessionType, S: SessionType> Chan<'a, I, E, Send<A, S>>
[src]
impl<'a, I: IO<A>, A, E: SessionType, S: SessionType> Chan<'a, I, E, Recv<A, S>>
[src]
impl<'a, I, E: SessionType, S: SessionType> Chan<'a, I, E, Nest<S>>
[src]
impl<'a, I, N: Peano, E: SessionType + Pop<N>> Chan<'a, I, E, Escape<N>>
[src]
impl<'a, I: IO<usize>, E: SessionType, P: SessionType> Chan<'a, I, E, P>
[src]
fn choose<S: SessionType>(self) -> Chan<'a, I, E, S> where P: Chooser<S>
Select a protocol to advance to.