[−][src]Function winconsole::console::get_foreground_color
pub fn get_foreground_color() -> WinResult<ConsoleColor>
Returns the current foreground color of the console.
Examples
let foreground = console::get_foreground_color().unwrap(); println!("Foreground color: {}", foreground);
Errors
InvalidHandleError
: Returned if an invalid handle to the console output is retrieved or used.IoError
: Returned if an OS error occurs.