#[unsafe(no_mangle)]pub unsafe extern "C" fn nstd_io_stdin_read(
handle: &mut NSTDStdin,
buffer: &mut NSTDSliceMut,
) -> NSTDIOResultAvailable on crate feature
io only.Expand description
Reads some data from stdin into a byte slice 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
NSTDIOResult read - The number of bytes read from handle on success, or the I/O operation
error code on failure.
§Safety
buffer’s data must be valid for writes.