[−][src]Struct crossterm_winapi::ConsoleMode
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
Auto Trait Implementations
impl Send for ConsoleMode
impl Sync for ConsoleMode
impl Unpin for ConsoleMode
impl UnwindSafe for ConsoleMode
impl RefUnwindSafe for ConsoleMode
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,