read_pipe 0.2.0

Simple utility to read console pipes.
Documentation

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