[−][src]Function winconsole::console::set_window_size
pub fn set_window_size(columns: u16, rows: u16) -> WinResult<()>
Sets the size of the console window in character cells. If the screen buffer is too small for the new size, it is resized as well.
Examples
let size = console::get_window_size().unwrap(); console::set_window_size(size.x + 10, size.y + 10).unwrap();
Errors
ArgumentError
: Returned if eithercolumns
orrows
is less than zero, exceeds the maximum window size, or if addition will result in a value which is greater than the i16 maximum value.InvalidHandleError
: Returned if an invalid handle to the console output is retrieved or used.IoError
: Returned if an OS error occurs.