Struct std::io::ChainAdapter
Adapter for a pair of streams that chains them together.
See chain extension method.
Fields
-
first: &mut R1
-
second: &mut R2
-
done: bool
Methods
-
fn new(first: &mut R1, second: &mut R2) -> ChainAdapter<R1, R2>
Creates a new adapter for a pair of streams
-
fn read(self: &mut ChainAdapter<R1, R2>, buf: &mut [u8]) -> Result<usize>
Reads from the stream into a provided buffer.
If successful, returns the number of bytes read. This may be less than the size of the provided buffer.
Mixins
-
mixin Readable<ChainAdapter<R1, R2>>
-
Fills the provided buffer by reading from the stream.
If stream had less bytes available than the size of the buffer, this method will return an
Error::eof()
. -
Reads the entire stream into a
StringBuf
.If successful, returns the number of bytes that were read.