]> git.lizzy.rs Git - rust.git/commit
Introduce an io::Buffer trait
authorAlex Crichton <alex@alexcrichton.com>
Wed, 13 Nov 2013 19:17:58 +0000 (11:17 -0800)
committerAlex Crichton <alex@alexcrichton.com>
Wed, 13 Nov 2013 19:36:13 +0000 (11:36 -0800)
commit7bc092f109d79b7214fb11108bbe38ac322c775c
tree7b37f9c7fe08e52458ba2d6cd79b161e999c34ab
parent825b127d4771ac417572cd783143f0cf7da34e48
Introduce an io::Buffer trait

This trait is meant to abstract whether a reader is actually implemented with an
underlying buffer. For all readers which are implemented as such, we can
efficiently implement things like read_char, read_line, read_until, etc. There
are two required methods for managing the internal buffer, and otherwise
read_line and friends can all become default methods.

Closes #10334
src/libstd/io/buffered.rs
src/libstd/io/mem.rs
src/libstd/io/mod.rs
src/libstd/prelude.rs