mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-26 00:00:23 +02:00
Add prelude
This commit is contained in:
+10
@@ -68,6 +68,16 @@ pub use self::{
|
||||
pub use async_trait::async_trait;
|
||||
pub use tower_http::add_extension::{AddExtension, AddExtensionLayer};
|
||||
|
||||
pub mod prelude {
|
||||
pub use crate::{
|
||||
body::Body,
|
||||
extract,
|
||||
handler::{get, on, post, Handler},
|
||||
response, route,
|
||||
routing::AddRoute,
|
||||
};
|
||||
}
|
||||
|
||||
pub fn route<S>(spec: &str, svc: S) -> Route<S, EmptyRouter>
|
||||
where
|
||||
S: Service<Request<Body>, Error = Infallible> + Clone,
|
||||
|
||||
Reference in New Issue
Block a user