Crates.io | read_pipe |
lib.rs | read_pipe |
version | 0.2.0 |
source | src |
created_at | 2022-07-07 20:16:02.834121 |
updated_at | 2024-02-02 23:21:52.441632 |
description | Simple utility to read console pipes. |
homepage | |
repository | https://github.com/LyonSyonII/read_pipe |
max_upload_size | |
id | 621438 |
size | 2,615 |
Simple Rust crate to read pipes from stdin.
if let Some(pipe) = read_pipe::read_pipe() {
println!("User has piped \"{pipe}\" to the program.")
}
Input:
echo "Really interesting pipe" | cargo run
Output:
Some("Really interesting pipe")
Input:
cargo run
Output:
None