Trait nemo::Handler
[−]
[src]
pub trait Handler<I, E: SessionType, S: SessionType>: Protocol + Sized { fn with<'a>(Chan<'a, I, E, S>) -> Defer<Self, I>; }
Handler
is implemented on Protocol
for every session type you expect to defer,
including the initial state.
Required Methods
fn with<'a>(Chan<'a, I, E, S>) -> Defer<Self, I>
Given a channel in a particular state, with a particular environment,
do whatever you'd like with the channel and return Defer
, which you
can obtain by doing .defer()
on the channel or .close()
on the
channel.