diff --git a/axum/src/middleware/from_fn.rs b/axum/src/middleware/from_fn.rs index e34fd058..d0d5046c 100644 --- a/axum/src/middleware/from_fn.rs +++ b/axum/src/middleware/from_fn.rs @@ -114,6 +114,8 @@ pub fn from_fn(f: F) -> FromFnLayer { /// Create a middleware from an async function with the given state. /// +/// For the requirements for the function supplied see [`from_fn`]. +/// /// See [`State`](crate::extract::State) for more details about accessing state. /// /// # Example