aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKatharina Fey <kookie@spacekookie.de>2020-03-18 22:12:43 +0100
committerKatharina Fey <kookie@spacekookie.de>2020-03-18 22:12:43 +0100
commit389b481607714d7aa69de80ef4849cbdf2d7a26c (patch)
tree8f644142364983f0847dee5c73556fe1f8dd754f
parente458ac4c5293762f0afcfa8c2649995ce1b3ba09 (diff)
Creating an Io channel abstraction
-rw-r--r--src/io.rs22
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 }
+ }
+}