Skip to content

Feature request: io::IsTerminal should not be sealed #161989

Description

@nicola-gigante

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-ioArea: `std::io`, `std::fs`, `std::net` and `std::path`C-feature-requestCategory: A feature request, i.e: not implemented / a PR.T-libsRelevant to the library team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions