Skip to content

std::bufio

Status: experimental

Buffered readers, writers, and line scanners.

API details and source

The implementation source contains the complete declarations and implementation notes. The table below lists canonical Gossamer call signatures; every item name links directly to its implementation file.

Item Canonical signature or declaration Description
Reader type Reader Buffered reader.
Scanner type Scanner Line / token scanner.
Writer type Writer Buffered writer.
read_lines fn read_lines(path: String) -> Result<Vec<String>, io::Error> Reads every line from a file path; one-shot convenience over the streaming Scanner.
read_lines_of fn read_lines_of(path: String) -> Result<Vec<String>, io::Error> Reads every line of a file path into a Vec.
read_to_string fn read_to_string(path: String) -> Result<String, io::Error> Reads an entire file path into a String.
split_whitespace fn split_whitespace(text: String) -> Vec<String> Splits a String on runs of whitespace.