mirror of
https://github.com/tokio-rs/axum.git
synced 2024-12-27 15:00:31 +01:00
Update methods to create FromFnLayer
(#2966)
Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
This commit is contained in:
parent
af95794e7d
commit
2f18abb7fa
1 changed files with 2 additions and 2 deletions
|
@ -170,7 +170,7 @@ pub fn from_fn_with_state<F, S, T>(state: S, f: F) -> FromFnLayer<F, S, T> {
|
|||
///
|
||||
/// [`tower::Layer`] is used to apply middleware to [`Router`](crate::Router)'s.
|
||||
///
|
||||
/// Created with [`from_fn`]. See that function for more details.
|
||||
/// Created with [`from_fn`] or [`from_fn_with_state`]. See those functions for more details.
|
||||
#[must_use]
|
||||
pub struct FromFnLayer<F, S, T> {
|
||||
f: F,
|
||||
|
@ -224,7 +224,7 @@ where
|
|||
|
||||
/// A middleware created from an async function.
|
||||
///
|
||||
/// Created with [`from_fn`]. See that function for more details.
|
||||
/// Created with [`from_fn`] or [`from_fn_with_state`]. See those functions for more details.
|
||||
pub struct FromFn<F, S, I, T> {
|
||||
f: F,
|
||||
inner: I,
|
||||
|
|
Loading…
Reference in a new issue