Feature request: `io::IsTerminal` should not be sealed
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
This is a bit a companion of #161941 in the sense that I hit on the fact that io::IsTerminal is sealed in the same situation.
I have a RenderTarget: io::Write + io::IsTerminal trait in a tool that does fancy things on the terminal, and it would be great to be able to implement it for custom io::Write instances, but io::IsTerminal is sealed so this is not possible.
An ugly workaround is to have RenderTarget: io::Write + IsTerminalEx instead where IsTerminalEx has a blanket implementation for T: io::IsTerminal. But this is just a workaround for the fact that io::IsTerminal is sealed.
Assuming there are no reasons I don't know to keep io::IsTerminal sealed, unsealing it would make life easier in this situation.
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
Start by reviewing the definition and sealing rationale for io::IsTerminal, then compare the custom RenderTarget and IsTerminalEx workaround described here. Done means determining whether the public trait can be unsealed and recording the required API and design decision.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- api, backend-api-design
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100