pub fn peek_console_input<'i>(console_input: &impl AsConsoleInputHandle) -> io::Result<impl Iterator<Item = INPUT_RECORD>> {
    const N : usize = 32;
    let mut buffer : [INPUT_RECORD; N] = unsafe { zeroed() };
    let mut read = 0;
    succeeded_to_result(unsafe { PeekConsoleInputW(console_input.as_raw_handle().cast(), buffer.as_mut_ptr(), N as _, &mut read) })?;
    Ok(std::array::IntoIter::new(buffer).take(read as _))
}
/// \[[PeekConsoleInput]\] Reads data from the specified console input buffer without removing it from the buffer.
///
/// ### Example
/// ```
/// # use maulingmonkey_console_winapi_wrappers::*;
/// # use std::io::{self, *};
/// # let _ = (|| -> io::Result<()> {
/// for record in peek_console_input(&stdin())? {
///     // ...
/// }
/// # Ok(())
/// # })();
/// ```
///
/// [PeekConsoleInput]: https://docs.microsoft.com/en-us/windows/console/peekconsoleinput
\[[PeekConsoleInput]\] Reads data from the specified console input buffer without removing it from the buffer.
\ [[ PeekConsoleInput ] \ ] Reads data from the specified console input buffer without removing it from the buffer .
pub fn peek_console_input<'i>(console_input: &impl AsConsoleInputHandle) -> io::Result<impl Iterator<Item = INPUT_RECORD>> {
    const N : usize = 32;
    let mut buffer : [INPUT_RECORD; N] = unsafe { zeroed() };
    let mut read = 0;
    succeeded_to_result(unsafe { PeekConsoleInputW(console_input.as_raw_handle().cast(), buffer.as_mut_ptr(), N as _, &mut read) })?;
    Ok(std::array::IntoIter::new(buffer).take(read as _))
}
pub fn peek_console_input < ' i > ( console_input : & impl AsConsoleInputHandle ) -> io :: Result < impl Iterator < Item = INPUT_RECORD > > { const N : usize = 32 ; let mut buffer : [ INPUT_RECORD ; N ] = unsafe { zeroed ( ) } ; let mut read = 0 ; succeeded_to_result ( unsafe { PeekConsoleInputW ( console_input . as_raw_handle ( ) . cast ( ) , buffer . as_mut_ptr ( ) , N as _ , & mut read ) } ) ? ; Ok ( std :: array :: IntoIter :: new ( buffer ) . take ( read as _ ) ) }
\[[PeekConsoleInput]\] Reads data from the specified console input buffer without removing it from the buffer.
\ [[ PeekConsoleInput ] \ ] Reads data from the specified console input buffer without removing it from the buffer .
console_input
&impl AsConsoleInputHandle
console_input
&impl AsConsoleInputHandle
example
None
use maulingmonkey_console_winapi_wrappers::*;
None
use std::io::{self, *};
None
let _ = (|| -> io::result<()> {
for record in peek_console_input(&stdin()).
for record in peek_console_input ( &stdin () ) .
ok(())
None
})();
None