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

How to store and pass around Terminal of any type. #70

Open
dpc opened this issue Feb 7, 2017 · 3 comments
Open

How to store and pass around Terminal of any type. #70

dpc opened this issue Feb 7, 2017 · 3 comments

Comments

@dpc
Copy link

dpc commented Feb 7, 2017

Hi,

I wonder how to store and pass around Terminal of any type: no matter if it logs to stdout, stder, on Windows, or elsewhere. Like Box<Terminal>, that because of type Output seems currently impossible. I wish I could have Box<Terminal<Output=Write>> or something like that.

Am I missing something, and if not, could some solution for this be provided?

@dpc
Copy link
Author

dpc commented Feb 7, 2017

If it's only stdout and stderr to ever be supported, I guess a simple enum that implements Write would do.

@Stebalien
Copy link
Owner

Hmm... yes, that's rather annoying. Unfortunately, I can't think of a backwards compatible way to fix it but I'll consider fixing it in a backwards incompatible release. In the meantime, we don't plan on adding more terminal types (in this version of term) so you could always implement that enum.

Worse, this is my fault: #29 😢.

@dpc
Copy link
Author

dpc commented Feb 7, 2017

It's not blocking me or anything, just a feature request then. :)

Our lives are full of API regrets sealed by semver restrictions. :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants