Replies: 1 comment 4 replies
-
You need to specify the associated types of |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
version: 1.0.0-rc.2
I always failed to declare a generic
service handler
, would anyone please give a help?Here is my code
After passing it to
.serve_connection(stream, service_fn(handler::generic_handler))
, I got a lot of errors,e.g.
the trait
StdError
is not implemented for<impl Body as Body>::Error
<impl Body as Body>::Error
cannot be sent between threads safely...
====
Another question is, is that possible to handle both http1 and http2 in one
Builder
, i.e.http::Builder::new()....
. As to oneservice handler
and one port can serve either http1 or http2. Or are there any other ways except for checking the ALPN before running theserver_connection()
?Beta Was this translation helpful? Give feedback.
All reactions