UpgradableConnection::graceful_shutdown is inaccessible via public interface
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.3k
- Forks
- 1.8k
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 14
Description
This has been discussed in #2587 - and decided against, and the stated intention not to export UpgradableConnection is that it is supposed to be used via Future trait. However it is also exposes a useful non-trait api graceful_shutdown that is needed in some circumstances.
A curious thing is that the api is (partially) usable - via the returned value, if it is not explicitly typed let x = conn.with_upgrades(). However it prevents the value to be sored in a struct/returned/passed as parameter - without loosing access to this api - which presents problem on the caller side.
Exporting UpgradableConnection would be the most straightforward solution IMO.
Cheers!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read the discussion in #2587 first, then inspect the public interface around with_upgrades, UpgradableConnection, and graceful_shutdown. Done means callers can store, return, or pass the value while retaining access to graceful_shutdown, with the public-API decision aligned with that discussion.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- api, backend-api-design
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100