read_pipe 0.2.0

Simple utility to read console pipes.
Documentation
  • Coverage
  • 100%
    3 out of 3 items documented1 out of 3 items with examples
  • Size
  • Source code size: 2.27 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.07 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 10s Average build duration of successful builds.
  • all releases: 10s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • LyonSyonII/read-pipe
    2 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • LyonSyonII

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