diff --git a/axum/src/routing/mod.rs b/axum/src/routing/mod.rs index 2e975d99..9c30288e 100644 --- a/axum/src/routing/mod.rs +++ b/axum/src/routing/mod.rs @@ -58,6 +58,12 @@ macro_rules! panic_on_err { pub(crate) struct RouteId(u32); /// The router type for composing handlers and services. +/// +/// `Router` means a router that is _missing_ a state of type `S` to be able +/// to handle requests. Thus, only `Router<()>` (i.e. without missing state) can +/// be passed to [`serve`]. See [`Router::with_state`] for more details. +/// +/// [`serve`]: crate::serve() #[must_use] pub struct Router { inner: Arc>,