Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change Connect trait to alias Service #1902

Closed
seanmonstar opened this issue Aug 17, 2019 · 2 comments · Fixed by #1912
Closed

Change Connect trait to alias Service #1902

seanmonstar opened this issue Aug 17, 2019 · 2 comments · Fixed by #1912
Labels
A-client Area: client. E-medium Effort: medium. Some knowledge of how hyper internal works would be useful.
Milestone

Comments

@seanmonstar
Copy link
Member

After #1782 is done, the Connect trait should be changed to basically an alias for a Service<Destination>. This would allow more composability, being able to use ServiceExt to customize connectors.

@seanmonstar seanmonstar added A-client Area: client. E-medium Effort: medium. Some knowledge of how hyper internal works would be useful. labels Aug 17, 2019
@seanmonstar seanmonstar added this to the 0.13 milestone Aug 17, 2019
@seanmonstar
Copy link
Member Author

I just remember there is also MakeConnection in tower, perhaps that can just be used instead. One difference is that hyper's Connect currently returns a Connected metadata type.

seanmonstar added a commit that referenced this issue Aug 21, 2019
The `Connect` trait is now essentially an alias for
`Service<Destination>`, with a blanket implementation as such, and is
sealed.

Closes #1902

BREAKING CHANGE: Any manual implementations of `Connect` must instead
  implement `tower::Service<Destination>`.
@LucioFranco
Copy link
Member

@seanmonstar I totally missed this issue! But we should drop the connected struct and use http_connection::HttpConnection trait. Which pretty much does the same but allows us to be a bit more flexible. I'm honestly in the boat that we should just drop Connect or have it be what https://github.com/tower-rs/tower-http/blob/master/tower-http-util/src/connection.rs#L15 was.

seanmonstar added a commit that referenced this issue Oct 22, 2019
The `Connect` trait is now essentially an alias for
`Service<Destination>`, with a blanket implementation as such, and is
sealed.

Closes #1902

BREAKING CHANGE: Any manual implementations of `Connect` must instead
  implement `tower::Service<Destination>`.
seanmonstar added a commit that referenced this issue Oct 22, 2019
The `Connect` trait is now essentially an alias for
`Service<Destination>`, with a blanket implementation as such, and is
sealed.

Closes #1902

BREAKING CHANGE: Any manual implementations of `Connect` must instead
  implement `tower::Service<Destination>`.
seanmonstar added a commit that referenced this issue Oct 22, 2019
The `Connect` trait is now essentially an alias for
`Service<Destination>`, with a blanket implementation as such, and is
sealed.

Closes #1902

BREAKING CHANGE: Any manual implementations of `Connect` must instead
  implement `tower::Service<Destination>`.
seanmonstar added a commit that referenced this issue Oct 22, 2019
The `Connect` trait is now essentially an alias for
`Service<Destination>`, with a blanket implementation as such, and is
sealed.

Closes #1902

BREAKING CHANGE: Any manual implementations of `Connect` must instead
  implement `tower::Service<Destination>`.
seanmonstar added a commit that referenced this issue Oct 22, 2019
The `Connect` trait is now essentially an alias for
`Service<Destination>`, with a blanket implementation as such, and is
sealed.

Closes #1902

BREAKING CHANGE: Any manual implementations of `Connect` must instead
  implement `tower::Service<Destination>`.
seanmonstar added a commit that referenced this issue Oct 22, 2019
The `Connect` trait is now essentially an alias for
`Service<Destination>`, with a blanket implementation as such, and is
sealed.

Closes #1902

BREAKING CHANGE: Any manual implementations of `Connect` must instead
  implement `tower::Service<Destination>`.
seanmonstar added a commit that referenced this issue Oct 22, 2019
The `Connect` trait is now essentially an alias for
`Service<Destination>`, with a blanket implementation as such, and is
sealed.

Closes #1902

BREAKING CHANGE: Any manual implementations of `Connect` must instead
  implement `tower::Service<Destination>`.
seanmonstar added a commit that referenced this issue Oct 22, 2019
The `Connect` trait is now essentially an alias for
`Service<Destination>`, with a blanket implementation as such, and is
sealed.

Closes #1902

BREAKING CHANGE: Any manual implementations of `Connect` must instead
  implement `tower::Service<Destination>`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-client Area: client. E-medium Effort: medium. Some knowledge of how hyper internal works would be useful.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants