tokio-rev-lines

Crates.iotokio-rev-lines
lib.rstokio-rev-lines
version0.2.1
sourcesrc
created_at2022-07-11 07:31:43.488841
updated_at2022-07-12 06:30:35.989818
descriptionThis library provides an async stream for reading files or any `BufReader` line by line with buffering in reverse.
homepage
repositoryhttps://github.com/JasonWei512/tokio-rev-lines
max_upload_size
id623615
(JasonWei512)

documentation

https://docs.rs/tokio-rev-lines

README

# tokio-rev-lines [![Crate](https://img.shields.io/crates/v/tokio-rev-lines.svg)](https://crates.io/crates/tokio-rev-lines) [![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE) This library provides an async stream for reading files or any `BufReader` line by line with buffering in reverse. It's an async tokio version of [rev_lines](https://github.com/mjc-gh/rev_lines). ### Documentation Documentation is available on [Docs.rs](https://docs.rs/tokio-rev-lines). ### Example ```rust use futures_util::{pin_mut, StreamExt}; use tokio::{fs::File, io::BufReader}; use tokio_rev_lines::RevLines; #[tokio::main] async fn main() -> Result<(), Box> { let file = File::open("tests/multi_line_file").await?; let rev_lines = RevLines::new(BufReader::new(file)).await?; pin_mut!(rev_lines); while let Some(line) = rev_lines.next().await { println!("{}", line?); } Ok(()) } ```
Commit count: 4

cargo fmt