#tokio #pipe #async

tokio-pipe

Asynchronous pipe(2) library using tokio

16 releases

0.2.12 Jun 26, 2022
0.2.11 Mar 2, 2022
0.2.10 Jan 25, 2022
0.2.9 Dec 29, 2021
0.1.3 Jul 4, 2020

#77 in Asynchronous

Download history 2454/week @ 2022-12-04 2693/week @ 2022-12-11 3100/week @ 2022-12-18 1845/week @ 2022-12-25 2813/week @ 2023-01-01 3924/week @ 2023-01-08 3502/week @ 2023-01-15 3770/week @ 2023-01-22 3599/week @ 2023-01-29 4141/week @ 2023-02-05 3362/week @ 2023-02-12 3225/week @ 2023-02-19 3112/week @ 2023-02-26 4188/week @ 2023-03-05 4531/week @ 2023-03-12 4389/week @ 2023-03-19

16,517 downloads per month
Used in 14 crates (9 directly)

MIT/Apache

35KB
844 lines

tokio-pipe

tokio-pipe dependency status

Asynchronous pipe(2) library using tokio.

Example

use tokio::prelude::*;

#[tokio::main]
async fn main() -> anyhow::Result<()> {
    let (mut r, mut w) = tokio_pipe::pipe()?;

    w.write_all(b"HELLO, WORLD!").await?;

    let mut buf = [0; 16];
    let len = r.read(&mut buf[..]).await?;

    assert_eq!(&buf[..len], &b"HELLO, WORLD!"[..]);
    Ok(())
}

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~2.2–6MB
~92K SLoC