You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
axum's Router is generic over the request body but it defaults the type parameter to axum::body::Body (hyper's body type). However that isn't compatible with this library which requires axum::body::BoxBody such that middleware can more easily change the request body type. Typing axum::Router<axum::body::BoxBody> is tedious so we've added this re-export:
pubtypeRouter<B = BoxBody> = axum::Router<B>;
However that means there are now two routers to know about: the one in axum and one in this library. They're subtly different because Server::with doesn't support axum::Router but it does support server_framework::Router.
All this can be very confusing to new users who aren't familiar with the ecosystem and things fit together.
We should consider ways to fix, or least alleviate this.
The text was updated successfully, but these errors were encountered:
axum's
Router
is generic over the request body but it defaults the type parameter toaxum::body::Body
(hyper's body type). However that isn't compatible with this library which requiresaxum::body::BoxBody
such that middleware can more easily change the request body type. Typingaxum::Router<axum::body::BoxBody>
is tedious so we've added this re-export:However that means there are now two routers to know about: the one in axum and one in this library. They're subtly different because
Server::with
doesn't supportaxum::Router
but it does supportserver_framework::Router
.All this can be very confusing to new users who aren't familiar with the ecosystem and things fit together.
We should consider ways to fix, or least alleviate this.
The text was updated successfully, but these errors were encountered: