nstd_io_stdin_read_all

Function nstd_io_stdin_read_all 

Source
#[unsafe(no_mangle)]
pub extern "C" fn nstd_io_stdin_read_all( handle: &mut NSTDStdin, buffer: &mut NSTDVec<'_>, ) -> NSTDIOResult
Available on crate feature io only.
Expand description

Continuously reads data from stdin into a buffer until EOF is reached.

§Note

If extending the buffer fails, an error code of NSTD_IO_ERROR_OUT_OF_MEMORY will be returned. This does not mean there were no bytes read from handle in this case.

§Parameters:

  • NSTDStdin *handle - A handle to the standard input stream.

  • NSTDVec *buffer - The buffer to be extended with data from stdin.

§Returns

NSTDIOResult read - The number of bytes read from handle on success, or the I/O operation error code on failure.