]> code.octet-stream.net Git - netwatcher/blobdiff - src/watch_mac.rs
Split out list and watch implementations
[netwatcher] / src / watch_mac.rs
diff --git a/src/watch_mac.rs b/src/watch_mac.rs
new file mode 100644 (file)
index 0000000..547db48
--- /dev/null
@@ -0,0 +1,10 @@
+use crate::Update;\r
+\r
+pub struct WatchHandle;\r
+\r
+pub fn watch_interfaces<F: FnMut(Update)>(callback: F) -> WatchHandle {\r
+    // stop current worker thread\r
+    // post this into a thread that will use it\r
+    drop(callback);\r
+    WatchHandle\r
+}\r