summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeir Lawson <keirlawson@gmail.com>2024-09-30 16:55:53 +0100
committerGitHub <noreply@github.com>2024-09-30 15:55:53 +0000
commit20b94453470243200768c84dadf44a4b8d67becf (patch)
tree166060bbdda2a43aa393393e0ed529d58ac30bda
parent4944ed3b1c5abaf85341248ab0ddea3be537327e (diff)
Reference the requirements for from_fn_with_state (#2950)
-rw-r--r--axum/src/middleware/from_fn.rs2
1 files changed, 2 insertions, 0 deletions
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, T>(f: F) -> FromFnLayer<F, (), T> {
/// 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