Net: Start work on this

This commit is contained in:
ProtoByter 2022-09-07 20:08:33 +01:00
parent b70924f530
commit 0ce50b39b5
3 changed files with 14 additions and 0 deletions

View File

@ -1,5 +1,7 @@
mod db;
mod log;
mod net;
mod message;
fn main() {
let mut db = db::get_backend("sqlite");

1
src/message.rs Normal file
View File

@ -0,0 +1 @@
enum Message {}

11
src/net/mod.rs Normal file
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>;
}