Skip to content

Commit

Permalink
Reference the requirements for from_fn_with_state (#2950)
Browse files Browse the repository at this point in the history
  • Loading branch information
keirlawson authored Sep 30, 2024
1 parent 4944ed3 commit 20b9445
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions axum/src/middleware/from_fn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 20b9445

Please sign in to comment.