hyperium / hyper

An HTTP library for Rust
https://hyper.rs
MIT License
14.42k stars 1.59k forks source link

refactor(upgrade): make parts of `upgrade`` public #3600

Closed apersomany closed 6 months ago

apersomany commented 6 months ago

Making Pending, pending, and Pending::fulfill public allows external libraries to provide the OnUpgrade extension to HTTP server frameworks (such as Axum or Warp) that solely depend on Hyper's upgrade mechanism.

seanmonstar commented 6 months ago

Thanks for the PR!

I'm hesitant to make the other parts of this public. It sorta reveals that the internals are a channel, and we'd thus need to maintain that forever.

apersomany commented 6 months ago

I see. Let me close the PR for now.