diff options
Diffstat (limited to 'src/module.rs')
| -rw-r--r-- | src/module.rs | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/src/module.rs b/src/module.rs index 0c2a67b..e9ac743 100644 --- a/src/module.rs +++ b/src/module.rs @@ -16,15 +16,9 @@ // Copyright (C) 2022-2022 Fuwn <[email protected]> // SPDX-License-Identifier: GPL-3.0-only -use crate::{context::HookContext, Router}; +mod asynchronous; +mod sync; -pub trait Module { - /// Called right after the module is attached. - fn on_attach(&mut self, _: &mut Router) {} - - /// Called before a route is mounted. - fn on_pre_route(&mut self, _: HookContext<'_>) {} - - /// Called after a route is mounted. - fn on_post_route(&mut self, _: HookContext<'_>) {} -} +#[allow(clippy::module_name_repetitions)] +pub use asynchronous::AsyncModule; +pub use sync::Module; |