#[no_mangle]
pub unsafe extern "C" fn nstd_io_stdout_write(
    handle: &mut NSTDStdout,
    bytes: &NSTDSlice
) -> NSTDIOResult
Available on crate feature nstd_io only.
Expand description

Writes some data to the standard output stream, returning how many bytes were written.

Note

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

Parameters:

  • NSTDStdout *handle - A handle to stdout.

  • const NSTDSlice *bytes - The data to be written to stdout.

Returns

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

Safety

This function can cause undefined behavior if bytes’s data is invalid.