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
Besides this just being an incredibly complex type signature, users can't derive any information out of it because the type Routes is private. In particular, you can't figure out what the associated types mean (or what the constraints imply) without going to the source code.
The text was updated successfully, but these errors were encountered:
The trait bounds are not intentionally complicated but exist to enable other features. You're welcome to make suggestions on how to simplify them.
The Routes type is private because users shouldn't have to use it. That'll be changed in #830 which makes the routing simpler, including simplifying some types.
The compiler errors produced from these bounds are what is important. Most of these bounds just add send requirements and in reality can be mostly ignored. Once rust gets proper trait aliases we can consider using those to reduce it. Going to close this but feel free to reopen it if you have any more questions!
Bug Report
Version
0.6.2
Platform
any
Crates
tonic
Description
The type signatures in the
Server
/Router
builders are convoluted and reference private types, which makes them completely un-understandable to users.For example, from
tonic::transport::server::Router
:Besides this just being an incredibly complex type signature, users can't derive any information out of it because the type
Routes
is private. In particular, you can't figure out what the associated types mean (or what the constraints imply) without going to the source code.The text was updated successfully, but these errors were encountered: