pub trait SaolaModule:
Send
+ Sync
+ 'static {
// Required method
fn name(&self) -> &'static str;
// Provided methods
fn context(&self) -> &'static str { ... }
fn priority(&self) -> i32 { ... }
fn register(&self, _app: &mut Registrar) { ... }
fn routes(&self, _ctx: &mut ContextRoutes<'_>) { ... }
fn web_routes(&self, _route: &mut Router) { ... }
fn api_routes(&self, _route: &mut Router) { ... }
}Expand description
Modular registration unit mirroring Saola’s ModuleServiceProvider / ModuleService.
Required Methods§
Provided Methods§
fn context(&self) -> &'static str
fn priority(&self) -> i32
fn register(&self, _app: &mut Registrar)
Sourcefn routes(&self, _ctx: &mut ContextRoutes<'_>)
fn routes(&self, _ctx: &mut ContextRoutes<'_>)
Registers routes into any declared Saola context (web, admin, api, subdomains…).
fn web_routes(&self, _route: &mut Router)
fn api_routes(&self, _route: &mut Router)
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".