Net: Start work on this

This commit is contained in:
ProtoByter committed 2022-09-07 20:08:41 +01:00
1 parent b70924f530
commit 0ce50b39b5
3 files changed
+14

No files matched your search

+2
View File
@@ -1,5 +1,7 @@
mod db;
mod log;
mod net;
mod message;
fn main() {
let mut db = db::get_backend("sqlite");
+1
View File
@@ -0,0 +1 @@
enum Message {}
+11
View File
@@ -0,0 +1,11 @@
use crate::log::*;
trait NetBackend {
fn start(&mut self) -> Result<(), String>;
fn stop(&mut self) -> Result<(), String>;
fn notify_existance(&mut self) -> Result<(), String>;
fn notify_shutdown(&mut self) -> Result<(), String>;
fn send(&mut self, id: &str, message: &str) -> Result<(), String>;
}