Reference the requirements for from_fn_with_state (#2950)

This commit is contained in:
Keir Lawson 2024-09-30 16:55:53 +01:00 committed by GitHub
parent 4944ed3b1c
commit 20b9445347
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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. /// 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. /// See [`State`](crate::extract::State) for more details about accessing state.
/// ///
/// # Example /// # Example