[−][src]Function winconsole::console::set_foreground_color
pub fn set_foreground_color(color: ConsoleColor) -> WinResult<()>
Sets the foreground color of the console.
Arguments
color
- The color which will be assigned to the foreground.
Examples
console::set_foreground_color(ConsoleColor::Red).unwrap();
Errors
InvalidHandleError
: Returned if an invalid handle to the console output is retrieved or used.IoError
: Returned if an OS error occurs.