m4rw3r / chomp

A fast monadic-style parser combinator designed to work on stable Rust.
Apache License 2.0
243 stars 19 forks source link

Source: implement Write if contained stream is Write #66

Closed dario23 closed 7 years ago

dario23 commented 7 years ago

when DataSource is a network connection or other bi-directional stream that you need to communicate as well as to parse data from, it's necessary to have access to the underlying contained Write methods. as the Source struct is the owner of the stream struct at that point, it seems necessary to wrap the underlying methods and implement Write for Source if the contained DataSource is an instance of Write.

i didn't include any version number change in this, as chomp is still well below 1.0.0 it's even by SemVer guidelines entirely your call :-)