pub fn write_console(console_output: &mut impl AsConsoleOutputHandle, buffer: &[u16], _reserved: impl Reserved) -> io::Result<usize> {
    let length = buffer.len().try_into().unwrap_or(!0);
    let mut written = 0;
    succeeded_to_result(unsafe { WriteConsoleW(console_output.as_raw_handle().cast(), buffer.as_ptr().cast(), length, &mut written, null_mut()) })?;
    Ok(written as _)
}
/// \[[WriteConsoleW]\] Writes a character string to a console screen buffer beginning at the current cursor location.
///
/// ### Example
/// ```
/// # use maulingmonkey_console_winapi_wrappers::*;
/// # use std::io::{self, *};
/// # let _ = (|| -> io::Result<()> {
/// write_console(&mut stdout(), wchar::wch!("Hello, world!"), ())?;
/// # Ok(())
/// # })();
/// ```
///
/// [WriteConsoleW]: https://docs.microsoft.com/en-us/windows/console/writeconsole
\[[WriteConsoleW]\] Writes a character string to a console screen buffer beginning at the current cursor location.
\ [[ WriteConsoleW ] \ ] Writes a character string to a console screen buffer beginning at the current cursor location .
pub fn write_console(console_output: &mut impl AsConsoleOutputHandle, buffer: &[u16], _reserved: impl Reserved) -> io::Result<usize> {
    let length = buffer.len().try_into().unwrap_or(!0);
    let mut written = 0;
    succeeded_to_result(unsafe { WriteConsoleW(console_output.as_raw_handle().cast(), buffer.as_ptr().cast(), length, &mut written, null_mut()) })?;
    Ok(written as _)
}
pub fn write_console ( console_output : & mut impl AsConsoleOutputHandle , buffer : & [ u16 ] , _reserved : impl Reserved ) -> io :: Result < usize > { let length = buffer . len ( ) . try_into ( ) . unwrap_or ( ! 0 ) ; let mut written = 0 ; succeeded_to_result ( unsafe { WriteConsoleW ( console_output . as_raw_handle ( ) . cast ( ) , buffer . as_ptr ( ) . cast ( ) , length , & mut written , null_mut ( ) ) } ) ? ; Ok ( written as _ ) }
\[[WriteConsoleW]\] Writes a character string to a console screen buffer beginning at the current cursor location.
\ [[ WriteConsoleW ] \ ] Writes a character string to a console screen buffer beginning at the current cursor location .
console_output
&mut impl AsConsoleOutputHandle
buffer
&[u16]
_reserved
impl Reserved
console_output
&mut impl AsConsoleOutputHandle
buffer
&[u16]
_reserved
impl Reserved
example
None
use maulingmonkey_console_winapi_wrappers::*;
None
use std::io::{self, *};
None
let _ = (|| -> io::result<()> {
write_console(&mut stdout(), wchar::wch!("Hello, world!"), ())?.
write_console ( &mut stdout () wchar :: wch! ( " Hello world! " ) () ) ? .
ok(())
None
})();
None