Reference the requirements for from_fn_with_state (#2950)

This commit is contained in:
Keir Lawson
2024-09-30 15:55:53 +00:00
committed by GitHub
parent 4944ed3b1c
commit 20b9445347
+2
View File
@@ -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