You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While I Implemented Read and Write on a custom type, I noticed that the errors that can happen during Read are not always the same as the errors that happen during write.
For example, if you implement a Cursor type like the one in std::io, read cannot fail, while write can fail if the storage is full.
I propose to remove ErrorType and simply add an associated type Error to Read, Write and Seek. We don't have to add one to BufRead because it is a super trait of Read. We could make ReadReady and WriteReady super traits of Read and Write respectively.
I think this makes the code more flexible and idiomatic. This also looks more consistent with the approach of mebedded-hal of favoring fine-grained errors.