Skip to main content

read_stdin

Function read_stdin 

Source
pub fn read_stdin() -> RUMResult<RUMBuffer>
Expand description

Consumes the incoming buffer in chunks of BUFFER_CHUNK_SIZE bytes size until no more bytes are present.

ยงExample

use rumtk_core::cli::cli_utils::{read_stdin};

let stdin_data = read_stdin().unwrap();

assert_eq!(stdin_data.len(), 0, "Returned data with {} size even though we expected 0 bytes!", stdin_data.len())