Expand description
§use-stdin
Synchronous stdin primitives for RustUse CLI-adjacent code.
This crate provides small read helpers and marker types. It does not assume an async runtime or interactive UI framework.
§Example
use std::io::Cursor;
use use_stdin::read_to_string_from;
let input = read_to_string_from(Cursor::new("hello"))?;
assert_eq!(input, "hello");§Scope
Use this crate for testable, synchronous stdin-adjacent helpers.
Modules§
- prelude
- Commonly used stdin primitives.
Structs§
- Stdin
Source - Marker type for the process standard input stream.
Functions§
- read_
line_ from - Reads one line from a buffered reader.
- read_
stdin_ line - Reads one line from process stdin.
- read_
stdin_ to_ string - Reads all process stdin into a string.
- read_
to_ string_ from - Reads all content from a generic reader into a string.