mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-29 00:00:18 +02:00
Clarify that AddExtension is not the actual Layer (#3463)
This commit is contained in:
@@ -157,6 +157,9 @@ where
|
|||||||
/// for more details.
|
/// for more details.
|
||||||
///
|
///
|
||||||
/// [request extensions]: https://docs.rs/http/latest/http/struct.Extensions.html
|
/// [request extensions]: https://docs.rs/http/latest/http/struct.Extensions.html
|
||||||
|
///
|
||||||
|
/// If you need a layer to add an extension to every request,
|
||||||
|
/// use the [Layer](tower::Layer) implementation of [Extension].
|
||||||
#[derive(Clone, Copy, Debug)]
|
#[derive(Clone, Copy, Debug)]
|
||||||
pub struct AddExtension<S, T> {
|
pub struct AddExtension<S, T> {
|
||||||
pub(crate) inner: S,
|
pub(crate) inner: S,
|
||||||
|
|||||||
Reference in New Issue
Block a user