pub fn read_stdin_with_timeout(secs: u64) -> Result<String, AppError>Expand description
Reads stdin to a String with a hard deadline.
Returns AppError::Validation immediately when --no-input is in force,
and AppError::Internal immediately when stdin is attached to a terminal
(TTY) โ the caller must redirect data via a pipe or file.
ยงErrors
Returns AppError::Validation when --no-input is in force,
AppError::Internal when stdin is a TTY, when the read does
not finish within secs seconds, or AppError::Io when the
underlying read fails.