README (802B)
1 bufio provides an [[io::stream]] implementation which provides buffered I/O 2 support, utility functions which pair well with buffered streams, and a 3 [[scanner]] type which allocates and maintains its own read buffer. 4 5 A buffered [[stream]] is used to batch read and write operations against an 6 underlying [[io::handle]]. bufio provides several utilities for reading from 7 handles, namely [[read_tok]] et al. These functions require small, frequent 8 reads, or take advantage of look-ahead, and thus are most efficient when paired 9 with a buffered [[stream]]. 10 11 bufio also provides a "scanning" interface, with functions like [[scan_string]] 12 which take in a [[scanner]]. Strings returned from scanning functions are 13 borrowed from the scanner's read buffer, so allocated memory can be reused for 14 future scans.