Struct ConsoleMode

Source
pub struct ConsoleMode;
Expand description

Wraps constants values of the console modes.

link: https://docs.microsoft.com/en-us/windows/console/getconsolemode

Implementations§

Source§

impl ConsoleMode

Source

pub const ENABLE_PROCESSED_INPUT: u32 = 1u32

CTRL+C is processed by the system and is not placed in the input buffer. If the input buffer is being read by ReadFile or ReadConsole, other control keys are processed by the system and are not returned in the ReadFile or ReadConsole buffer

Source

pub const ENABLE_LINE_INPUT: u32 = 2u32

The ReadFile or ReadConsole function returns only when a carriage return character is read. If this mode is disabled, the functions return when one or more characters are available.

Source

pub const ENABLE_ECHO_INPUT: u32 = 4u32

Characters read by the ReadFile or ReadConsole function are written to the active screen buffer as they are read. This mode can be used only if the ENABLE_LINE_INPUT mode is also enabled.

Source

pub const ENABLE_WINDOW_INPUT: u32 = 8u32

User interactions that change the size of the console screen buffer are reported in the console’s input buffer.

Source

pub const ENABLE_MOUSE_INPUT: u32 = 16u32

If the mouse pointer is within the borders of the console window and the window has the keyboard focus, mouse events generated by mouse movement and button presses are placed in the input buffer.

Source

pub const ENABLE_INSERT_MODE: u32 = 32u32

When enabled, text entered in a console window will be inserted at the current cursor location and all text following that location will not be overwritten. When disabled, all following text will be overwritten.

Source

pub const ENABLE_QUICK_EDIT_MODE: u32 = 64u32

This flag enables the user to use the mouse to select and edit text.

Source

pub const ENABLE_EXTENDED_FLAGS: u32 = 128u32

Required to enable or disable extended flags. See ENABLE_INSERT_MODE and ENABLE_QUICK_EDIT_MODE. link: https://docs.microsoft.com/en-us/windows/console/setconsolemode#parameters

Source

pub const ENABLE_VIRTUAL_TERMINAL_INPUT: u32 = 512u32

Setting this flag directs the Virtual Terminal processing engine to convert user input received by the console window into Console Virtual Terminal Sequences that can be retrieved by a supporting application through ReadFile or ReadConsole functions.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.