Expand the docs for Router::with_state (#1580)

This commit is contained in:
David Pedersen
2022-11-27 01:01:59 +01:00
committed by GitHub
parent 8d62697c72
commit eb2e933054
3 changed files with 238 additions and 59 deletions
+1 -2
View File
@@ -5,10 +5,9 @@
///
/// See [`State`] for more details on how library authors should use this trait.
///
/// This trait can be derived using `#[derive(axum_macros::FromRef)]`.
/// This trait can be derived using `#[derive(FromRef)]`.
///
/// [`State`]: https://docs.rs/axum/0.6/axum/extract/struct.State.html
/// [`#[derive(axum_macros::FromRef)]`]: https://docs.rs/axum-macros/latest/axum_macros/derive.FromRef.html
// NOTE: This trait is defined in axum-core, even though it is mainly used with `State` which is
// defined in axum. That allows crate authors to use it when implementing extractors.
pub trait FromRef<T> {