Crate rev_lines

source ·
Expand description

RevLines

This library provides a small Rust Iterator for reading files or any BufReader line by line with buffering in reverse.

Example
use std::fs::File;

use rev_lines::RevLines;

let file = File::open("README.md").unwrap();
let rev_lines = RevLines::new(file);

for line in rev_lines {
    println!("{:?}", line);
}

If a line with invalid UTF-8 is encountered, the iterator will return None next, and stop iterating.

This method uses logic borrowed from uutils/coreutils tail

Structs

Enums