blob: 8822ea483d1e0efc840f5aa338da8247f71dd560 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
use crate::context::HookContext;
#[async_trait::async_trait]
pub trait AsyncModule: Send + Sync {
/// Called right after the module is attached.
async fn on_attach(&mut self, _: &mut crate::router::Router) {}
/// Called before a route is mounted.
async fn on_pre_route(&mut self, _: HookContext) {}
/// Called after a route is mounted.
async fn on_post_route(&mut self, _: HookContext) {}
}
|