pipecircuit 0.0.21

Correct. Robust. Fast. Portable. Pick four.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use pipecircuit::{Inline, InstalledPipe, Pipe, StateMachine, StepInputOf};
struct First;
struct Second;
impl Pipe for First { type In<'message> = Input; type Out<'message> = (); }
impl Pipe for Second { type In<'message> = Input; type Out<'message> = (); }
struct Implementation;
impl StateMachine for Implementation {}
struct Input;
impl StepInputOf<Implementation> for Input {
    type Outcome = ();
    fn step(self, _: &mut Implementation) {}
}
fn main() {
    let transport = Inline::for_pipe::<First>(Implementation);
    let mut installed = InstalledPipe::<Second, _>::new(transport);
    installed.send(Input);
}