Clarify that AddExtension is not the actual Layer (#3463)

This commit is contained in:
Niclas Klugmann 2025-09-12 09:21:19 +02:00 committed by GitHub
parent e4550d23b1
commit 25acc8d131
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -157,6 +157,9 @@ where
/// for more details.
///
/// [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)]
pub struct AddExtension<S, T> {
pub(crate) inner: S,