[][src]Struct crossterm_winapi::ConsoleMode

pub struct ConsoleMode { /* fields omitted */ }

This abstracts away some WinaApi calls to set and get the console mode.

Wraps the underlying function call: SetConsoleMode link: [https://docs.microsoft.com/en-us/windows/console/setconsolemode]

Wraps the underlying function call: GetConsoleMode link: [https://docs.microsoft.com/en-us/windows/console/getconsolemode]

Methods

impl ConsoleMode[src]

pub fn new() -> Result<ConsoleMode>[src]

Create a new ConsoleMode instance.

This will use the STD_OUTPUT_HANDLE as default handle. When you explicitly want to specify the handle used for the function calls use ConsoleMode::from(handle) instead.

pub fn set_mode(&self, console_mode: u32) -> Result<()>[src]

Set the console mode to the given console mode.

This function sets the dwMode.

Wraps the underlying function call: SetConsoleMode link: [https://docs.microsoft.com/en-us/windows/console/setconsolemode]

pub fn mode(&self) -> Result<u32>[src]

Get the console mode.

This function returns the lpMode.

Wraps the underlying function call: GetConsoleMode link: [https://docs.microsoft.com/en-us/windows/console/getconsolemode]

Trait Implementations

impl From<Handle> for ConsoleMode[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]