Struct chomp::buffer::data_source::RWDataSource [] [src]

pub struct RWDataSource<RW: Read + Write>(_);

Implementation of DataSource for streams (e.g. network connections) that you can Read and Write. It's really helpful to have the ability to write through the DataSource and Source objects, because once created, often they take full ownership of your input stream, and when working with bidirectional connections you still need a way to write to them.

Methods

impl<RW: Read + Write> RWDataSource<RW>
[src]

Creates a new RWDataSource from a stream (e.g. network connection).

Consumes self to reveal the underlying stream.

Trait Implementations

impl<RW: Debug + Read + Write> Debug for RWDataSource<RW>
[src]

Formats the value using the given formatter.

impl<RW: Read + Write> DataSource for RWDataSource<RW>
[src]

The type of items this data source produces.

Populates the supplied buffer with data, returns the number of items written. Read more

impl<RW: Read + Write> Write for RWDataSource<RW>
[src]

Write a buffer into this object, returning how many bytes were written. Read more

Flush this output stream, ensuring that all intermediately buffered contents reach their destination. Read more

Attempts to write an entire buffer into this write. Read more

Writes a formatted string into this writer, returning any error encountered. Read more

Creates a "by reference" adaptor for this instance of Write. Read more