From 20b94453470243200768c84dadf44a4b8d67becf Mon Sep 17 00:00:00 2001 From: Keir Lawson Date: Mon, 30 Sep 2024 16:55:53 +0100 Subject: Reference the requirements for from_fn_with_state (#2950) --- axum/src/middleware/from_fn.rs | 2 ++ 1 file changed, 2 insertions(+) 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 -- cgit v1.2.3-70-g09d2