Closed
Description
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.
Metadata
Metadata
Assignees
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
alexcrichton commentedon May 1, 2014
I've been using
InvalidInput
for situations such as this, do you think that this is distinct enough from that kind?carllerche commentedon May 1, 2014
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.
steveklabnik commentedon Apr 20, 2015
Triage: no change
Mark-Simulacrum commentedon Sep 18, 2016
io::ErrorKind::InvalidData
has the following description:I think this fits the described UnexpectedOutput, so can this be closed?
Auto merge of rust-lang#13882 - Veykril:bin-op-adjust, r=Veykril
Do not remove required parentheses in `borrow_as_ptr` suggestion (rus…