Net: Start work on this
This commit is contained in:
parent
b70924f530
commit
0ce50b39b5
@ -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
1
src/message.rs
Normal file
@ -0,0 +1 @@
|
||||
enum Message {}
|
11
src/net/mod.rs
Normal file
11
src/net/mod.rs
Normal 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>;
|
||||
}
|
Loading…
Reference in New Issue
Block a user