diff options
author | Katharina Fey <kookie@spacekookie.de> | 2020-03-18 22:12:43 +0100 |
---|---|---|
committer | Katharina Fey <kookie@spacekookie.de> | 2020-03-18 22:12:43 +0100 |
commit | 389b481607714d7aa69de80ef4849cbdf2d7a26c (patch) | |
tree | 8f644142364983f0847dee5c73556fe1f8dd754f | |
parent | e458ac4c5293762f0afcfa8c2649995ce1b3ba09 (diff) |
Creating an Io channel abstraction
-rw-r--r-- | src/io.rs | 22 |
1 files changed, 22 insertions, 0 deletions
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 } + } +} |