-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Add UnexpectedOutput to IoErrorKind (or something similar) #13882
Comments
I've been using |
InvalidInput implies to me that what I provided the API was incorrect. UnexpectedOutput would be the reverse. Whether they are distinct enough, I don't know. I didn't think it was appropriate to use InvalidInput. |
Triage: no change |
I think this fits the described UnexpectedOutput, so can this be closed? |
Write down adjustments introduced by binary operators
This would help support any higher level IO abstractions, such as parsers, or wrappers around process calls, etc...
For example, an abstraction that shims execing sub processes and handling the result could fail w/ UnexpectedOutput if the subprocess did not provide a valid result.
Another use-case, when wrapping an IO stream w/ an HTTP parser (or any higher level protocol), it would be nice to just return an IO like API, but when failing to parse, there is no good IoErrorKind to describe failing to handle the output in the abstraction.
The text was updated successfully, but these errors were encountered: