pub fn read_console_output_attribute<'a>(console_output: &impl AsConsoleOutputHandle, attributes: &'a mut [Attributes], read_coord: impl IntoCoord) -> io::Result<&'a [Attributes]> {
    let console_output = console_output.as_raw_handle().cast();
    let length : DWORD = attributes.len().try_into().unwrap_or(!0);
    let read_coord = read_coord.into_coord();

    let mut read = 0;
    succeeded_to_result(unsafe { ReadConsoleOutputAttribute(console_output, attributes.as_mut_ptr().cast(), length, read_coord, &mut read) })?;
    Ok(&attributes[.. read as _])
}
/// \[[ReadConsoleOutputAttribute]\] Copies a specified number of character attributes from consecutive cells of a console screen buffer, beginning at a specified location.
///
/// ### Example
/// ```
/// # use maulingmonkey_console_winapi_wrappers::*;
/// # use std::io::{self, *};
/// # let _ = (|| -> io::Result<()> {
/// let mut buffer = [Attributes::default(); 80];
/// read_console_output_attribute(&stdout(), &mut buffer, (0,0))?;
/// # Ok(())
/// # })();
/// ```
///
/// [ReadConsoleOutputAttribute]:   https://docs.microsoft.com/en-us/windows/console/readconsoleoutputattribute
\[[ReadConsoleOutputAttribute]\] Copies a specified number of character attributes from consecutive cells of a console screen buffer, beginning at a specified location.
\ [[ ReadConsoleOutputAttribute ] \ ] Copies a specified number of character attributes from consecutive cells of a console screen buffer beginning at a specified location .
pub fn read_console_output_attribute<'a>(console_output: &impl AsConsoleOutputHandle, attributes: &'a mut [Attributes], read_coord: impl IntoCoord) -> io::Result<&'a [Attributes]> {
    let console_output = console_output.as_raw_handle().cast();
    let length : DWORD = attributes.len().try_into().unwrap_or(!0);
    let read_coord = read_coord.into_coord();
    let mut read = 0;
    succeeded_to_result(unsafe { ReadConsoleOutputAttribute(console_output, attributes.as_mut_ptr().cast(), length, read_coord, &mut read) })?;
    Ok(&attributes[.. read as _])
}
pub fn read_console_output_attribute < ' a > ( console_output : & impl AsConsoleOutputHandle , attributes : & ' a mut [ Attributes ] , read_coord : impl IntoCoord ) -> io :: Result < & ' a [ Attributes ] > { let console_output = console_output . as_raw_handle ( ) . cast ( ) ; let length : DWORD = attributes . len ( ) . try_into ( ) . unwrap_or ( ! 0 ) ; let read_coord = read_coord . into_coord ( ) ; let mut read = 0 ; succeeded_to_result ( unsafe { ReadConsoleOutputAttribute ( console_output , attributes . as_mut_ptr ( ) . cast ( ) , length , read_coord , & mut read ) } ) ? ; Ok ( & attributes [ .. read as _ ] ) }
\[[ReadConsoleOutputAttribute]\] Copies a specified number of character attributes from consecutive cells of a console screen buffer, beginning at a specified location.
\ [[ ReadConsoleOutputAttribute ] \ ] Copies a specified number of character attributes from consecutive cells of a console screen buffer beginning at a specified location .
console_output
&impl AsConsoleOutputHandle
attributes
&'a mut [Attributes]
read_coord
impl IntoCoord
console_output
&impl AsConsoleOutputHandle
attributes
&'a mut [Attributes]
read_coord
impl IntoCoord
example
None
use maulingmonkey_console_winapi_wrappers::*;
None
use std::io::{self, *};
None
let _ = (|| -> io::result<()> {
let mut buffer = [Attributes::default(); 80];
read_console_output_attribute(&stdout(), &mut buffer, (0,0))?.
let mut buffer = [ Attributes :: default () ; 80 ] ; read_console_output_attribute ( &stdout () &mut buffer ( 0 0 )) ? .
ok(())
None
})();
None