Añade una arquitectura escalable basada en módulos

This commit is contained in:
Manuel Cillero 2022-02-10 23:58:22 +01:00
parent e1ea149988
commit 4e23523e80
10 changed files with 108 additions and 19 deletions

14
src/core/module/api.rs Normal file
View file

@ -0,0 +1,14 @@
use crate::core::server;
/// Modules must implement this trait.
pub trait Module: Send + Sync {
fn name(&self) -> String;
fn description(&self) -> String {
"".to_string()
}
#[allow(unused_variables)]
fn configure_module(&self, cfg: &mut server::web::ServiceConfig) {
}
}