Skip to content
This repository has been archived by the owner on Apr 16, 2020. It is now read-only.

Private trait in Service implementation bounds for Connect #44

Closed
mzabaluev opened this issue Jun 3, 2019 · 2 comments · Fixed by #46
Closed

Private trait in Service implementation bounds for Connect #44

mzabaluev opened this issue Jun 3, 2019 · 2 comments · Fixed by #46

Comments

@mzabaluev
Copy link
Contributor

The implementation of Service for Connect features a type parameter bound of ConnectExecutor, which is a private trait (leading to a rabbit hole of prerequisites and parameter bounds). This makes it practically impossible to use Connect with a generic executor, as the required bound for the executor type is an internal detail of tower-hyper.

@mzabaluev
Copy link
Contributor Author

It looks like the executor bound could be respecified in terms of TypedExecutor and hyper::client::conn::Connection, but the error-eating MapErr looks a bit temp-ish to export. Does the implementation simply need more principled error propagation before the bounds can be stabilized?

@mzabaluev
Copy link
Contributor Author

mzabaluev commented Jun 3, 2019

tower-h2 has client::Background to represent the background task generically. It would be nice to have a similar wrapper type. Perhaps it could later get a customizable error handling type hook as an alternative to internal logging (discussed in #45).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant