Function get_pass

Source
pub fn get_pass(buf: &mut [u8]) -> Result<&str>
Expand description

Sets the terminal to no echo and waits for a line to be entered. The raw input, including the newline, will be put into the buffer and converted to a &str. If the buffer is too small to fit the input, an attempt will be made to drain stdin and then return an error.

ยงErrors

Buffer undersized. Stdin unreadable. Fail to set terminal attributes.