nstd_io_stdin_read_exact

Function nstd_io_stdin_read_exact 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn nstd_io_stdin_read_exact( handle: &mut NSTDStdin, buffer: &mut NSTDSliceMut, ) -> NSTDIOError
Available on crate feature io only.
Expand description

Reads enough data from stdin to fill the entirety of buffer.

§Note

This function will return an error code of NSTD_IO_ERROR_INVALID_INPUT if the buffer’s element size is not 1.

§Parameters:

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

  • NSTDSliceMut *buffer - The buffer to fill with data from stdin.

§Returns

NSTDIOError errc - The I/O operation error code.

§Safety

buffer must be valid for writes.