From 389b481607714d7aa69de80ef4849cbdf2d7a26c Mon Sep 17 00:00:00 2001 From: Katharina Fey Date: Wed, 18 Mar 2020 22:12:43 +0100 Subject: Creating an Io channel abstraction --- src/io.rs | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 src/io.rs diff --git a/src/io.rs b/src/io.rs new file mode 100644 index 000000000000..3032c2698190 --- /dev/null +++ b/src/io.rs @@ -0,0 +1,22 @@ +//! A module that adapts the ratman layer to RstNode + +use netmod_mem::MemMod; + +/// A pair of exits, connected +pub struct Io { + a: MemMod, + b: MemMod, +} + +impl Io { + fn new() -> Self { + Self::default() + } +} + +impl Default for Io { + fn default() -> Self { + let (a, b) = MemMod::make_pair(); + Self { a, b } + } +} -- cgit v1.2.3