···3232pub mod context;
3333pub mod handler;
3434pub mod module;
3535+#[cfg(feature = "prelude")]
3636+pub mod prelude;
3537pub mod response;
3638pub mod router;
3739pub mod utilities;
···41434244#[cfg(feature = "async-std")]
4345pub use async_std::main;
4444-pub use module::{AsyncModule, Module};
4545-pub use response::Response;
4646-pub use router::Router;
4746#[cfg(feature = "tokio")]
4847pub use tokio::main;
+1-1
src/module/asynchronous.rs
···2020#[async_trait::async_trait]
2121pub trait AsyncModule: Send + Sync {
2222 /// Called right after the module is attached.
2323- async fn on_attach(&mut self, _: &mut crate::Router) {}
2323+ async fn on_attach(&mut self, _: &mut crate::router::Router) {}
24242525 /// Called before a route is mounted.
2626 async fn on_pre_route(&mut self, _: HookContext) {}
+1-1
src/module/sync.rs
···19192020pub trait Module {
2121 /// Called right after the module is attached.
2222- fn on_attach(&mut self, _: &mut crate::Router) {}
2222+ fn on_attach(&mut self, _: &mut crate::router::Router) {}
23232424 /// Called before a route is mounted.
2525 fn on_pre_route(&mut self, _: HookContext) {}
+23
src/prelude.rs
···11+// This file is part of Windmark <https://github.com/gemrest/windmark>.
22+//
33+// This program is free software: you can redistribute it and/or modify
44+// it under the terms of the GNU General Public License as published by
55+// the Free Software Foundation, version 3.
66+//
77+// This program is distributed in the hope that it will be useful, but
88+// WITHOUT ANY WARRANTY; without even the implied warranty of
99+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1010+// General Public License for more details.
1111+//
1212+// You should have received a copy of the GNU General Public License
1313+// along with this program. If not, see <http://www.gnu.org/licenses/>.
1414+//
1515+// Copyright (C) 2022-2023 Fuwn <contact@fuwn.me>
1616+// SPDX-License-Identifier: GPL-3.0-only
1717+1818+pub use crate::{
1919+ context,
2020+ module::{AsyncModule, Module},
2121+ response::Response,
2222+ router::Router,
2323+};