read_pipe

Crates.ioread_pipe
lib.rsread_pipe
version0.2.0
sourcesrc
created_at2022-07-07 20:16:02.834121
updated_at2024-02-02 23:21:52.441632
descriptionSimple utility to read console pipes.
homepage
repositoryhttps://github.com/LyonSyonII/read_pipe
max_upload_size
id621438
size2,615
Liam Garriga (LyonSyonII)

documentation

https://docs.rs/read_pipe

README

read_pipe

Simple Rust crate to read pipes from stdin.

Usage

if let Some(pipe) = read_pipe::read_pipe() {
    println!("User has piped \"{pipe}\" to the program.")
}

Examples


Input:

echo "Really interesting pipe" | cargo run

Output:

Some("Really interesting pipe")

Input:

cargo run

Output:

None

Commit count: 9

cargo fmt