Añade una arquitectura escalable basada en módulos
This commit is contained in:
parent
e1ea149988
commit
4e23523e80
10 changed files with 108 additions and 19 deletions
14
src/core/module/api.rs
Normal file
14
src/core/module/api.rs
Normal 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) {
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue