[go: up one dir, main page]

Struct wincolor::Console [] [src]

pub struct Console { /* fields omitted */ }

A Windows console.

This represents a very limited set of functionality available to a Windows console. In particular, it can only change text attributes such as color and intensity.

There is no way to "write" to this console. Simply write to stdout or stderr instead, while interleaving instructions to the console to change text attributes.

A common pitfall when using a console is to forget to flush writes to stdout before setting new text attributes.

Methods

impl Console
[src]

Create a new Console to stdout.

If there was a problem creating the console, then an error is returned.

Create a new Console to stderr.

If there was a problem creating the console, then an error is returned.

Apply the given intensity and color attributes to the console foreground.

If there was a problem setting attributes on the console, then an error is returned.

Apply the given intensity and color attributes to the console background.

If there was a problem setting attributes on the console, then an error is returned.

Reset the console text attributes to their original settings.

The original settings correspond to the text attributes on the console when this Console value was created.

If there was a problem setting attributes on the console, then an error is returned.

Trait Implementations

impl Debug for Console
[src]

Formats the value using the given formatter.

impl Send for Console
[src]

impl Drop for Console
[src]

A method called when the value goes out of scope. Read more