diff options
author | Keir Lawson <keirlawson@gmail.com> | 2024-09-30 16:55:53 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-30 15:55:53 +0000 |
commit | 20b94453470243200768c84dadf44a4b8d67becf (patch) | |
tree | 166060bbdda2a43aa393393e0ed529d58ac30bda | |
parent | 4944ed3b1c5abaf85341248ab0ddea3be537327e (diff) |
Reference the requirements for from_fn_with_state (#2950)
-rw-r--r-- | axum/src/middleware/from_fn.rs | 2 |
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 |