tauri_utils::io

Function read_line

Source
pub fn read_line<R: BufRead + ?Sized>(
    r: &mut R,
    buf: &mut Vec<u8>,
) -> Result<usize>
Expand description

Read all bytes until a newline (the 0xA byte) or a carriage return (\r) is reached, and append them to the provided buffer.

Adapted from https://doc.rust-lang.org/std/io/trait.BufRead.html#method.read_line.