mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-28 00:00:20 +02:00
Re-export middleware::from_fn from axum-extra to avoid making breaking changes
This commit is contained in:
@@ -46,3 +46,18 @@
|
||||
pub mod extract;
|
||||
pub mod response;
|
||||
pub mod routing;
|
||||
|
||||
pub mod middleware {
|
||||
//! Additional types for creating middleware.
|
||||
|
||||
pub use axum::middleware::{from_fn, Next};
|
||||
|
||||
pub mod middleware_fn {
|
||||
//! Create middleware from async functions.
|
||||
|
||||
pub use axum::middleware::{
|
||||
from_fn, futures::FromFnResponseFuture as ResponseFuture, FromFn as MiddlewareFn,
|
||||
FromFnLayer as MiddlewareFnLayer, Next,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,3 +3,9 @@
|
||||
mod from_fn;
|
||||
|
||||
pub use self::from_fn::{from_fn, FromFn, FromFnLayer, Next};
|
||||
|
||||
pub mod futures {
|
||||
//! Future types.
|
||||
|
||||
pub use super::from_fn::ResponseFuture as FromFnResponseFuture;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user