🏗️ Elegant & Highly Performant Async Gemini Server Framework for the Modern Age
async framework gemini-protocol protocol gemini rust
at main 13 lines 406 B view raw
1use crate::context::HookContext; 2 3#[async_trait::async_trait] 4pub trait AsyncModule: Send + Sync { 5 /// Called right after the module is attached. 6 async fn on_attach(&mut self, _: &mut crate::router::Router) {} 7 8 /// Called before a route is mounted. 9 async fn on_pre_route(&mut self, _: HookContext) {} 10 11 /// Called after a route is mounted. 12 async fn on_post_route(&mut self, _: HookContext) {} 13}